Answer the question
In order to leave comments, you need to log in
Why aren't session files saved?
Previously, everything was fine on the site, but now session files are not being written. I couldn't find the cause of the error myself.
When assigning an array element to $_SESSION on the page, the variable is used normally, but the file in /tmp (according to phpinfo) does not appear. Accordingly, when moving to another page, there is no data in the session. The rights to the folder - 755. Additional adding session_start(); at the beginning of the page code and session_write_close(); didn't help at the end. The error is repeated on different computers and in different browsers.
Site on wordpress. Hosting support wrote a reply.
Answer the question
In order to leave comments, you need to log in
1. no write permissions. try to explicitly write from the script to /tmp and see what happens
2. no disk space
PS native $_SESSION is evil.
PPS wordpress absolute evil
permissions on /var/lib/php/session must be writable for the user that the web server is running as.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question