php no sesssion files in session save path /tmp
using CENTOS 7.7, php 7.3, whm 86.0.18 I set php session.save_path = "/tmp" but there is not session files in /tmp folder, but site working properly, where it ll be session files, why not storing in /tmp, pls help
-
Take a look at phpinfo() and see where it says the sessions are being stored. 0 -
php info says same "/tmp" 0 -
Well, that is where they would be getting saved then. Perhaps your site is not generating session files, or perhaps its cleaning them up when done with them (which is what is supposed to happen) 0 -
my site won't work without generating session file, also my session expire time is 3 hour, is it possible /tmp folder in some other location? 0 -
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 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. 0 -
See my thread that I linked earlier, I managed to solve the issue with figuring out which file the server actually honored for setting the PHP session directory preference. 0 -
finally I find session save location.. by using following method.. in php echo 'sess_'.session_id() ; in linux search about out put, find / -name 'sess_6b966dbe1ceb5fd9c578a29aaf20c7a7' you can find location :) **************result /var/tmp/systemd-private-68f3ed4d63284150b4d8d6dd7b9d971a-ea-php73-php-fpm.service-6lwJY3/tmp/sess_6b966dbe1ceb5fd9c578a29aaf20c7a7 /tmp/systemd-private-68f3ed4d63284150b4d8d6dd7b9d971a-ea-php73-php-fpm.service-6lwJY3/tmp/sess_6b966dbe1ceb5fd9c578a29aaf20c7a7 ************** verdict, when we use php along with FPM, sesssion files saved in different manner ... 0 -
PHP-FPM has .ini values managed in a different manner. You can read about updating these and managing them here: How to Manage Your php.ini Directives with PHP FPM | cPanel & WHM Documentation 0
Please sign in to leave a comment.
Comments
10 comments