gpt4 book ai didi

php - apache 中的 Drupal 项目设置没有响应且没有错误

转载 作者:行者123 更新时间:2023-11-29 23:20:57 24 4
gpt4 key购买 nike

我有一个旧的 drupal 项目需要部署到我的系统中。

我得到了代码并设置了项目 mysql DB 和一切。

在浏览器中打开网络应用程序时,它不显示空白页面。甚至不返回任何错误。

我在另一个系统中做了同样的事情,效果很好,所以代码没有问题。

我有与运行系统相同的PHP、Mysql、Apache版本。

为什么它没有在我的系统中运行?

这是我的 apache 错误日志。

[Thu Dec 04 09:57:49 2014] [notice] Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.15 with Suhosin-Patch mod_wsgi/3.3 Python/2.7.3 configured -- resuming normal operations
[Thu Dec 04 09:58:02 2014] [error] [client 10.90.90.109] File does not exist: /var/www/favicon.ico
[Thu Dec 04 09:58:03 2014] [error] [client 10.90.90.109] File does not exist: /var/www/favicon.ico
[Thu Dec 04 10:11:36 2014] [error] [client 10.90.90.193] Directory index forbidden by Options directive: /var/www/myapp/main/, referer: http://10.90.90.109/careernetwork/
[Thu Dec 04 14:30:45 2014] [notice] Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.15 with Suhosin-Patch mod_wsgi/3.3 Python/2.7.3 configured -- resuming normal operations
[Thu Dec 04 14:57:10 2014] [error] [client 10.90.90.193] PHP Parse error: syntax error, unexpected '[' in /var/www/myapp/main/sites/all/modules/own/link_creator/link_creator.module on line 242, referer: http://10.90.90.109/careernetwork/
[Thu Dec 04 14:57:46 2014] [error] [client 10.90.90.193] PHP Parse error: syntax error, unexpected '[' in /var/www/myapp/main/sites/all/modules/own/link_creator/link_creator.module on line 242, referer: http://10.90.90.109/careernetwork/
[Thu Dec 04 18:08:23 2014] [notice] caught SIGTERM, shutting down
[Fri Dec 05 09:13:45 2014] [notice] Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.15 with Suhosin-Patch mod_wsgi/3.3 Python/2.7.3 configured -- resuming normal operations
[Fri Dec 05 09:15:10 2014] [error] [client 127.0.0.1] PHP Parse error: syntax error, unexpected '[' in /var/www/myapp/main/sites/all/modules/own/link_creator/link_creator.module on line 242
[Fri Dec 05 09:23:08 2014] [error] [client 127.0.0.1] PHP Parse error: syntax error, unexpected '[' in /var/www/myapp/main/sites/all/modules/own/link_creator/link_creator.module on line 242
[Fri Dec 05 09:23:10 2014] [error] [client 127.0.0.1] PHP Parse error: syntax error, unexpected '[' in /var/www/myapp/main/sites/all/modules/own/link_creator/link_creator.module on line 242

日志显示它有一些错误,但没有任何错误,因为它在另一个系统中完美执行。

请帮我解决这个问题,我不知道这个项目是否涉及任何依赖项。

如何检查我的 drupal 项目的所有必需依赖项。

我在浏览器中的错误: enter image description here

最佳答案

根据错误日志,错误在文件中

/var/www/myapp/main/sites/all/modules/own/link_creator/link_creator.module

上线242

打开这个link_creator.module并尝试找出您在哪里放置了不必要的[

只需前往那里并删除错误即可。

这是一个自定义模块(由项目开发团队开发的模块,而不是由 Drupal 核心/贡献团队开发的模块)。

因此,您需要通过在自己的机器上调试来修复它。

请通过以下方式报告错误:

error_reporting(E_ALL);
ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE);// THE ERROR WAS SEMICOLON NOT PLACED HERE

此外,如果您的 PHP 版本低于 5.3,请参阅 phpinfo(),这应该是一个原因。

关于php - apache 中的 Drupal 项目设置没有响应且没有错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27308607/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com