2014-02-13 18:28:24

Drupal 7, unable to login on CentOS

A quite annoying issue one of my clients encountered on all websites hosted on their webserver was that they were not able to login. After checking out the Drupal watchdog table I saw a lot of errors.

Failed to write session data (user)
session_destroy(): Session object destruction failed
session_write_close(): Failed to write session data (user). Please verify that the current setting of session.save_path is correct (/tmp)

Failing to see what the issue is, I had to dig in to the Apache and PHP settings. I noticed Suhosin was bundled with this PHP5.4 version on CentOS. Which seemed as quite odd to me.

Turns out that it was right to think of Suhosin as the culprit. You can see the bug report at https://github.com/stefanesser/suhosin/pull/26. Considering development has stopped on it for quite a while, it is interesting that it is still bundled in PHP distributions.

Fixing it was as simple as executing the following commands. Well, simple for you, now. -4 hours of my life.