Answer the question
In order to leave comments, you need to log in
How to fix session persistence in php7?
In general, updated on the php server to the 7th version. Speed pleased. Of course, a lot of errors appeared, I'm slowly fixing them, but there is one gag:
Nothing is saved in $_SESSION. More precisely, it is saved, but only in the current function. Ie:
step 1) We write to the session, we deduce from the session. OK! It came out.
step 2) Just exit the session. There is nothing. Empty.
Where are the legs from? The admin says that everything is set up correctly, the problem is on my side, but I've been fiddling around for half a day.
I didn’t find any updates regarding sessions in the php7 docks (
PS everything works correctly on php 5.5.
session.save_path is the same for 7 and 5.5 (there are several versions at once, you can switch)
Answer the question
In order to leave comments, you need to log in
Ultimately, the admin is to blame. Not me. Solving the problem (for those who came here from the search)
php_value session.save_handler files
php_value session.save_path /tmp/php_sess
Maybe it will help, like the same question is being discussed if I understand correctly
https://bugs.php.net/bug.php?id=70013
Look at the PHP logs. Most likely a problem with the rights to the directory where the sessions should be placed. The user running PHP as may not have write permissions.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question