I preemptively requested my host update Cent OS 6 to 8, they said they could only do 7...meh, okay whatever.
So I'm sitting on Cent OS 7.7 and I've read that you folks changed the PHP sessions from /tmp to /var/cpanel/php/sessions/ea-php73 for security reasons.
But several times a day I get this error:
session_start(): ps_files_cleanup_dir: opendir failed: Permission denied (13)
This error literally creates a cascading explosion of PHP errors and cripples the page load for visitors!
So I've been scrambling to try and figure the issue out. Some folks said it was a permissions issue though both the old/new server have root/root user/group permissions. The only thing different on the old server (that I am aware of) is that the
session.save_path is set to /tmp.
So after attempting to change the directory back to /tmp on the new server I'm finding that my public_html/php.ini and WHM all absolutely refusing to change the path (yes, server rebooted).
Let me make one thing clear: security does NOT matter if something becomes worthless to use! I'm running WHM 86.0.18 with all updates installed. I've read
this thread and as far as I can tell this PHP session bug is still an issue!
How do I force PHP to use obey me setting
session.save_path to /tmp?
Edit 1: so I'm now going to try to override the php.ini files. There are several of them! Authenticated as root via PuTTY I ran
find / -name '*php.ini*'.
Edit 2: so I ran
grep -r "/var/cpanel/php/sessions/ea-php73" / and eventually found the file and updated it. The file was
/home/example/public_html/.user.ini however I do not know if WHM/cPanel will overwrite this for any reason so I'll have to stay vigilant for a few days to make sure. I don't know if this change alone will fix the issue as it requires time to pass without the issue occurring however I know that the issue can occur several times a day so if the server can go for at least a couple of days I'll consider the issue resolved. As for cPanel employees: please test your code before deploying it! This was a serious waste of my time that I could have spent on much more important and literally life-improving activities.