我有一个带有 drupal_goto() 的模块,如果用户没有通过 hook_init() 中的年龄要求(葡萄酒网站),它会重定向用户。该模块设置了较重的重量,因此最后加载。
在 PHP 5.3 上,快速更新失败。使用 PHP 5.2 的不同服务器上的相同代码和数据库运行良好。
Drush 版本:7.x-4.4 PHP 版本:5.3 示例:
当我运行: drush status 时,我得到一个错误。这是带有调试和详细标志的输出。
$ drush -d -v status
Bootstrap to phase 0. [0.02 sec, 2.47 MB] [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drush() [0.03 sec, 2.67 MB] [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drupal_root() [0.06 sec, 5.49 MB] [bootstrap]
Initialized Drupal 6.22 root directory at /var/www/example.com/public_html [0.07 sec, 6.28 MB] [notice]
Drush bootstrap phase : _drush_bootstrap_drupal_site() [0.07 sec, 6.29 MB] [bootstrap]
Initialized Drupal site default at sites/default [0.07 sec, 6.29 MB] [notice]
Drush bootstrap phase : _drush_bootstrap_drupal_configuration() [0.08 sec, 6.29 MB] [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drupal_database() [0.08 sec, 6.33 MB] [bootstrap]
Successfully connected to the Drupal database. [0.08 sec, 6.33 MB] [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drupal_full() [0.09 sec, 6.67 MB] [bootstrap]
Drush command terminated abnormally due to an unrecoverable error. [0.34 sec, 31.38 MB] [error]
现在的问题是:为什么 drupal_goto() 会导致 drush 在 PHP 5.3 服务器而不是 PHP 5.2 服务器上失败。