I have a basic Drupal 6 site on a shared hosting environment. The site has been running fine for about a month.
I uploaded a new release of the webform Drupal module and when I go to update.php to complete the page I get errors. The update.php preview page doesn't not show any updates needed for webforms, but if I proceed I get the errors below. Perhaps if there are no patches I shouldn't proceed with update.php?
On the "run updates" step I get this error:
An HTTP error 0 occurred. http://nejewls开发者_Python百科.com/update.php?id=8&op=do
On the review log page I get this error
warning: array_pop() [function.array-pop]: The argument should be an array in /home/nejebel4/public_html/update.php on line 314.
Notes:
- The site is Drupal 6.14
- Webforms unknown to 6.x-2.9
- I tried disabling SecFilterInheritance at the .htaccess level
- The site redirects to www in the .htaccess file
- I set the base URL in settings.php to with and without the www
First question: how comes you don't know what version of webform you are running? What is it shown in the module or updates page of the site? If nothing is shown there. What's the value of the DB schema in the system table?
Second question: I had a colleague of mine one making a mess because he installed development version of modules. You sure you only used beta or stable versions and not dev snapshot previously?
Then, as for the solution...
I haven't any site handy where to try to reproduce your problem. But the warning you are getting is not the real problem... The problem seems - to me - that the update of webform does not run properly or does not properly report success.
The bit of code generating the warning is in the update.php file and it is:
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>';
}
so, the bit of code generating the error gets ran only when something goes wrong during the update procedure. It looks therefore as a bug in the module you are updating.
If I were in your situation and I absolutely wanted or needed the latest update I would try to perform the updates manually. Here's how to do that (I will assume your module is webform, but the procedure applies for other modules too:
- Backup your DB!
- Make sure you have the developer module installed.
- Browse the DB table "system" and find out what schema version you have currently installed for the webform module (it will normally be a four digit number starting with 6).
- Open the webform.install file in the directory of your module, and search for all the updates with a schema version bigger than the one you have. They will look like function called
webform_update_6XXX()
. - In the php console available at http://example.com/devel/php run all those updates one at a time, until you find the one that breaks the system and can debug it.
- File a bug with your patch so that the community can benefit from your work.
- Once you have worked around the problem, and installed all the updates you can manually set your system table with the last schema number you ran.
Another option you could try:
- Backup your DB!
- Deactivate and disinstall completely the webform module.
- Install the new version of webform.
- Manually import the data via SQL from the tables in the backup DB
Both options can be tricky and time-consuming.
Hope this helps!
It looks like this issue filed at Drupal.org. It doesn't look solved. I'd ask for help on the Drupal IRC channel #drupal on freenode
精彩评论