【问题标题】:I am unable to run the project in local environment after running the service httpd restart运行服务 httpd restart 后我无法在本地环境中运行项目
【发布时间】:2017-01-30 20:47:27
【问题描述】:

使用命令service httpd restart 运行httpd 后,我无法在本地运行项目。在运行项目时,它显示了 PHP 代码。你能帮我解决这个问题吗?这是PHP代码:

<?php// allow testing from the upgrade page before the site is upgraded.if (isset($_GET['__testing_rewrite'])) {
if (isset($_GET['__elgg_uri']) && false !== strpos($_GET['__elgg_uri'], '__testing_rewrite')) {
    echo "success";
}
exit;}require_once(dirname(__FILE__) . "/engine/start.php");$router = _elgg_services()->router;$request = _elgg_services()->request;if (!$router->route($request)) {
forward('', '404');}

【问题讨论】:

    标签: php apache http elgg


    【解决方案1】:

    检查 HTTP 配置和错误日志。 PHP 模块不再加载,或者 .php 扩展名(或您使用的任何扩展名)不再与 PHP 模块关联。

    在您向我们提供更多详细信息之前,我们只能回答这些问题。

    【讨论】:

    • 非常感谢先生回答我的问题。我检查了 http 配置和错误日志文件,但在重新启动 httpd 后我没有发现任何错误。这是我在本地使用的配置文件。你能检查一下吗。提前谢谢你先生。
    • ServerName local.women.org # ServerAlias DocumentRoot /var/www/html/women/ 选项索引 FollowSymLinks AllowOverride All Order Deny,Allow Allow from all ErrorLog /var/log/httpd/women/women_error_log CustomLog /var/log/httpd/women/women_access_log common
    • 那不是网络服务器的配置文件,只是网站的配置。您需要检查 httpd.conf,然后从那里开始。在 PHP 手册中阅读有关如何在您的 Web 服务器中手动安装 PHP 的信息将对您有很大帮助。 php.net/manual/en/install.php
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-04-29
    • 2019-06-06
    • 1970-01-01
    • 1970-01-01
    • 2015-04-14
    相关资源
    最近更新 更多