0
Answered

PHP Session issue preventing login

Matt V 1 month ago updated 4 weeks ago 1

I'm having an issue after updating PHP preventing me from logging in. Would love a nudge in the right direction as soon as possible. Issues occurred most likely after I did a Yum Update.


The Apache logs show the following warning:

[Tue Dec 24 17:07:37.229077 2019] [php7:warn] [pid 1842] [client 10.0.X.X:49779] PHP Warning: session_regenerate_id(): Cannot regenerate session id - session is not active in [webroot]/system/classes/vendor/FileRun/Auth.php on line 70, referer: https://files.XXXXXXX.com/

another possibly relevant log entry generated from another site that uses sessions:

[Tue Dec 24 16:50:08.944200 2019] [php7:warn] [pid 1619] [client 10.0.X.X:65167] PHP Warning: session_start(): open(/var/opt/remi/php71/lib/php/session/sess_8lnkra33tffeu0le5ro23ss3n7, O_RDWR) failed: Permission denied (13) in [webroot2]/index.php on line 3

Could this be related to this: https://stackoverflow.com/questions/6821532/php-warning-permission-denied-13-on-session-start or this: https://stackoverflow.com/questions/47700336/php-7-2-warning-cannot-change-session-name-when-session-is-active?

Here are the top few rows of info.php:

PHP Version 7.1.33

SystemLinux webserver 3.10.0-1062.9.1.el7.x86_64 #1 SMP Fri Dec 6 15:49:49 UTC 2019 x86_64
Build DateDec 17 2019 16:03:02
Server APIApache 2.0 Handler
Virtual Directory Supportdisabled
Configuration File (php.ini) Path/etc/opt/remi/php71
Loaded Configuration File/etc/opt/remi/php71/php.ini
Answered

Fixed. Took me way too long to figure it out. I needed to set the permissions for the root session directory /var/opt/remi/php71/lib/php/session to be writeable by webserver:DomainUsers since I use PHP_LDAP. The command

chmod webserver:DomainUsers /var/opt/remi/php71/lib/php/session

did the trick.