Drupal update.php产生错误
我在共享托管环境中有一个基本的Drupal6站点。该网站已经正常运行了大约一个月 我上传了一个新版本的WebFormDrupal模块,当我转到update.php来完成页面时,我发现了错误。php预览页面没有显示webforms所需的任何更新,但如果继续,我会收到以下错误。也许如果没有补丁,我不应该继续使用update.php 在“运行更新”步骤中,我遇到以下错误: 出现HTTP错误0 在查看日志页面上,我发现了这个错误 警告:array_pop()[function.array pop]:参数应该是第314行/home/nejebel4/public_html/update.php中的数组 注:Drupal update.php产生错误,drupal,drupal-6,Drupal,Drupal 6,我在共享托管环境中有一个基本的Drupal6站点。该网站已经正常运行了大约一个月 我上传了一个新版本的WebFormDrupal模块,当我转到update.php来完成页面时,我发现了错误。php预览页面没有显示webforms所需的任何更新,但如果继续,我会收到以下错误。也许如果没有补丁,我不应该继续使用update.php 在“运行更新”步骤中,我遇到以下错误: 出现HTTP错误0 在查看日志页面上,我发现了这个错误 警告:array_pop()[function.array pop]:参数
- 该站点是Drupal 6.14
- 6.x-2.9未知的Webforms
- 我尝试在.htaccess级别禁用SecFilterInheritance
- 该站点重定向到.htaccess文件中的www
- 我在settings.php中将基本URL设置为有www和无www
if ($_SESSION['update_success']) {
$output = '<p>Updates were attempted. If you see no failures below, you may proceed happily to the <a href="'. base_path() .'?q=admin">administration pages</a>. Otherwise, you may need to update your database manually.'. $log_message .'</p>';
}
else {
list($module, $version) = array_pop(reset($_SESSION['updates_remaining']));
$output = '<p class="error">The update process was aborted prematurely while running <strong>update #'. $version .' in '. $module .'.module</strong>.'. $log_message;
if (module_exists('dblog')) {
$output .= ' You may need to check the <code>watchdog</code> database table manually.';
}
$output .= '</p>';
}
因此,只有在更新过程中出现问题时,才会运行生成错误的代码位。因此,它看起来像是您正在更新的模块中的一个bug
如果我是在你的情况下,我绝对想要或需要最新的更新,我会尝试手动执行更新。以下是如何做到这一点(我假设您的模块是webform,但该过程也适用于其他模块:
webform\u update\u 6XXX()
的函数希望这有帮助!第一个问题:为什么您不知道您正在运行的webform的哪个版本?它在站点的模块或更新页面中显示了什么?如果没有显示。系统表中DB模式的值是多少 第二个问题:我的一个同事搞得一团糟,因为他安装了模块的开发版本。你确定你以前只使用测试版或稳定版,而不使用开发快照 那么,至于解决方案 我手头没有任何网站可以重现你的问题。但你得到的警告并不是真正的问题……在我看来,问题似乎在于webform的更新没有正常运行或没有正确报告成功 生成警告的代码位位于update.php文件中,它是:
if ($_SESSION['update_success']) {
$output = '<p>Updates were attempted. If you see no failures below, you may proceed happily to the <a href="'. base_path() .'?q=admin">administration pages</a>. Otherwise, you may need to update your database manually.'. $log_message .'</p>';
}
else {
list($module, $version) = array_pop(reset($_SESSION['updates_remaining']));
$output = '<p class="error">The update process was aborted prematurely while running <strong>update #'. $version .' in '. $module .'.module</strong>.'. $log_message;
if (module_exists('dblog')) {
$output .= ' You may need to check the <code>watchdog</code> database table manually.';
}
$output .= '</p>';
}
因此,只有在更新过程中出现问题时,才会运行生成错误的代码位。因此,它看起来像是您正在更新的模块中的错误
如果我处于您的情况,并且我绝对想要或需要最新的更新,我会尝试手动执行更新。下面是如何做到这一点(我假设您的模块是webform,但该过程也适用于其他模块:
webform\u update\u 6XXX()
的函数