2
votes

I cannot login to Drupal after attempting php 5.4 update.

I have two users, the default admin from install and a user level account with limited permissions. After logging in at mysite.com/user/login I am redirected to mysite.com/user/1 with the following message displayed "You are not authorized to access this page." I get the same when I attempt mysite.com/admin

I have commented out the $base_url and $cookies_domain entries in settings.php with no luck.

If I attempt to login with bad credentials my login is denied. So credentials verification is working.

Also, I purged the SESSIONS table in the database. I have attempted login many times after the SESSIONS purge but there are no new rows being created in that table.

Somehow I am passing the credentials verification stage but then the session fails to save to the database... ergo my "not authorized" message.

I'm not the least bit familiar with what is going on in Drupal core. Normally my Drupal installs just work.

Do you think this is a Drupal issue or PHP? Have I missed some stupid setting in php.ini?

p.s. - I actually have two apache virtual hosts, one with a Drupal 6 install and another with my Drupal 7... this login issue is happening to both installs. (Probably because they share PHP ?)

I greatly appreciate any thoughts or suggestions :-)

1
Do you have any caching solution implemented?Beto Aveiga

1 Answers

0
votes

Seems that you try several attempts there. Anyway I would suggest you the following:

Clear cache and run cron: $ drush cc all && $ drush cron Start the: /user/logout # to stop login sessions and try to login again.

Add to your index.php:

error_reporting(E_ALL | E_ERROR | E_WARNING | E_PARSE | E_NOTICE);
ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE);

Also check the watchdog table if you can recognize anything there. I'm on PHP 5.4.3 and not having any issues with that. If you will not find any workaround for that, PHP 5.3.10 is the minimal version required for D8 so a downgrade to it will be OK.

Did you try to make a fresh install of Drupal on your new PHP version?