A
A
Aricus2020-05-06 11:44:30
PHP
Aricus, 2020-05-06 11:44:30

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

3 answer(s)
D
Dmitry Entelis, 2020-05-06
@Aricus

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

A
Alexey Dmitriev, 2020-05-06
@SignFinder

permissions on /var/lib/php/session must be writable for the user that the web server is running as.

R
Ruslan Fedoseev, 2020-05-06
@martin74ua

df -h
df -i

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question