Error 500 on Drupal 7 upgrade

While upgrading this blog to Drupal 7 following the UPGRADE.txt, I encountered an error 500 on the update.php?op=info page.

Assuming it was an error caused by the .htaccess file I renamed it: no changes. Eventually I dived into the update.php code only to find on the line 340:

ini_set('display_errors', FALSE);

This just hides everything from output on error and provide an error 500 page. So unless you log your php errors in a file, you may not see what is going on. I don't know why Dries chose to do this (he seems to act like Steve Jobs these days wink ) but this is not funny and cost me an hour to figure it out...

Just comment this line or put TRUE instead of FALSE and there you go, you know exactly what is the issue. For me it was the token module that was defining duplicate functions with the same name, this is easily resolve with a "drush sqlc"and:

UPDATE system SET status = 0 WHERE name = 'token' AND type = 'module';

This can also be done with PhpMyAdmin.

Good luck upgrading from Drupal 6 to Drupal 7!