WSOD 即将打开 drupal 7 项目的第一页

WSOD coming on opening the 1st page of drupal 7 project

我检查过tail -n 20 /Applications/MAMP/logs/php_error.log。日志中没有错误。我正在使用 MAMP。

我也添加了

error_reporting(E_ALL);
ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE);  

index.php.

我在 php.ini 中的内存限制是

memory_limit = 512M 

有什么建议吗?

也许您必须启用干净的 URL?将此添加到 .htaccess 文件:

<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q= [L,QSA]
</IfModule>

尝试查看 Drupal 的日志。 用 drush:

  • drush 和 dblog
  • drush ws
  1. 错误日志没有出现,因为我在 index.php 中添加代码,它应该添加在 settings.php 文件的末尾:

    error_reporting(E_ALL); ini_set('display_errors', 真); ini_set('display_startup_errors', 真);

  2. 我检查日志后,有正常的警告。之后我启用了 drush & 它显示数据库正在连接但参数错误。 从 settings.php 文件中删除 $database 数组,然后像新的 vanilla 实例一样安装解决了这个问题。