You are here

Drupal 7.82 Server Error 500

I've been stuck on PHP 7.1 for my Drupal-based sites because, for some unknown reason, upgrading to PHP 7.4 results in a server Error 500. This problem stumped me for a while, but I've recently found a work-around. I wouldn't exactly call this a "fix", but I'm hoping to upgrade to Drupal 8 (or 9, or 10), so I'm willing to live with a patch or workaround. Anyway, it turns out that the error was being caused by the following line in the settings.php file:

ini_set('session.save_handler',  'user');

It turns out that PHP 7.2 dropped the ability to change the session save handler using ini_set(). Apparently, it's possible to call the session_set_save_handler() method, but at this point, I just want Drupal to work with PHP 7.4, so I commented out the line and Drupal no longer triggers a server error. Hopefully this will open the door to a Drupal upgrade in the near future.