Drupal's update.php script redirecting to homepage and not updating

17 comments

While upgrading a couple of different Drupal (5.x) sites, I ran into an annoying issue where the update.php script just redirected to the sites homepage after the "Select Version" page. The server in question has PHP's mod_security enabled which has caused some problems with other sites in the past, so I think it's related to that, but I'm not totally sure.

Any way, the fix is to add the following line of code to your update.php script before line 794

if ($_POST['op']) $_REQUEST['op'] = $_POST['op'];

The finished product should look something like:

update_fix_schema_version();
update_fix_watchdog_115();
update_fix_watchdog();
update_fix_sessions();

//start new code
if ($_POST['op']) $_REQUEST['op'] = $_POST['op'];
//end new code

$op = isset($_REQUEST['op']) ? $_REQUEST['op'] : '';
switch ($op) {
        case 'Update':
                $output = update_update_page();
                break;

Have you had the same problem? Do you know what is causing it? Did the above code work for you?


Comments

i'm having this issue in

i'm having this issue in cherokee and drupal 6.16, but your solution didn't solve the problem :-(

Thanks a lot for the nice

Thanks a lot for the nice case study and useful tutorial in this regard. The situation where drupal's update.php script redirects to homepage but not update is worth discussed about. It is an informative post.

It is very valuable study on

It is very valuable study on drupal's update.php script redirecting to homepage and not updating. Thanks for the nice codes to fix the problems.

I've been also going on with

I've been also going on with my project by following the trial and error method, and experience the same results. However, your post has encouraged me a lot in fixing the problem. thanks.

The post teaches and cautions

The post teaches and cautions us about the Drupal's update.php and related difficulties in doing updation. I've found the post to be very helpful and a good tutorial. thanks.

Redirecting to homepage is a

Redirecting to homepage is a wise thing which will bring enormous traffic to the website.I must appreciate the wholesome efforts made in this direction to make viewers avail of such new techniques.

It is an excellent tip for

It is an excellent tip for developers and programmers on this drupal's updatephp script redirecting to homepage and not updating. It is a valuable information.

I've been looking for the

I've been looking for the information to sort out my project requirements. I think it would be very helpful lesson for me in fixing the task. You've done a good job.

thanks admin..

The post teaches and cautions us about the Drupal's update.php and related difficulties in doing updation. I've found the post to be very helpful and a good tutorial. thanks.

Drupal's new update on php

Drupal's new update on php platform is incredible and is helping the viewers a lot in redirecting to homepage and updating the features.I think its a brilliant effort made by the viewers in this direction.

Dealing with Drupal is a

Dealing with Drupal is a complete pain. I moved my Drupal sites to wordpress last year and couldn't be happier.

It is quite profitable tip to

It is quite profitable tip to fix this annoying problem where drupal's update.php script redirecting to homepage and not updating. The post saves me a lot of time and energy.

Die

Die Berufsunfähigkeitsversicherung testen.
Eine Günstige Berufsunfähigkeitsversicherung abschliessen.

Thks for the heads up

Hey... Thks for the heads up. I did ran into the same update.php script just redirected problem earlier...

May start to try building a

May start to try building a Drupal site tomoro based on the great information I have learned here.

Kindle 3G d00901

ECU Cable for VAG ME7.1 - 7.5

ECU Cable for VAG ME7.1 - 7.5 and ME7.1.1 Allows diagnostics or flashing with various tools directly on the working table. 4mm Banana connectors for connection to power supply to power the ECU and the diagnostic or flash tool. DB9 female connector for connection to various tools as KWP2000 or KWP2000 pinout can be easily adjusted for other tools on the market by resoldering the cables on the DB9 connector. The connector is the ORIGINAL VAG part also used in the car.

Companies refuse to deal with

Companies refuse to deal with people who abuse power, under perform and generally make life difficult for their co-workers because they are afraid of wrongful termination lawsuits etc....

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options