Apache + suphp - PHP Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save path is correct


Материал из Wiki - Iphoster - 'the best ever hosting and support

Перейти к: навигация, поиск

Доступная цена


Ошибка:

[Mon Sep 08 09:13:52 2014] [error] [client 78.27.xxx.xxx] PHP Warning:  session_commit():
 open(/var/tmp/php5_sessions/sess_4ru7j8e8dno9jujrmoip7elqv6, O_RDWR) failed: Permission denied (13) in  
 /home/kipia/domains/legends.com/public_html/lib/main.php on line 383
[Mon Sep 08 09:13:52 2014] [error] [client 78.27.xxx.xxx] PHP Warning:  session_commit(): Failed to write session data (files). Please 
 verify that the current setting of session.save_path is correct (/var/tmp/php5_sessions) in /home/kipia/domains/legends
.com/public_html/lib/main.php on line 383
[Mon Sep 08 09:13:52 2014] [error] [client 78.27.xxx.xxx] PHP Warning:  session_start():
 open(/var/tmp/php5_sessions/sess_4ru7j8e8dno9jujrmoip7elqv6, O_RDWR) failed: Permission denied (13) in 
/home/kipia/domains/legends.com/public_html/lib/main.php on line 384
[Mon Sep 08 09:13:52 2014] [error] [client 78.27.xxx.xxx] PHP Warning:  Unknown: 
 open(/var/tmp/php5_sessions/sess_phj2nttorcrac446no1t7cmoj3, O_RDWR) failed: Permission denied (13) in Unknown on line 0
[Mon Sep 08 09:13:52 2014] [error] [client 78.27.xxx.xxx] PHP Warning:  Unknown: Failed to write session data (files). Please verify
that the current setting of session.save_path is correct (/var/tmp/php5_sessions) in Unknown on line 0


либо такая ошибка

[Mon Dec 22 06:51:18 2014] [error] [client 78.27.xxx.xxx] PHP Warning:  [obfuscated](): 
open(/var/tmp/php5_sessions/sess_l3osteh6d5enp25aebu4q9a785, O_RDWR) failed: No such file or directory (2) in  
/home/andre999/domains/domain.ru/public_html/panel/config.php on line 0


либо такая

mod_fcgid: stderr: PHP Warning:  Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/var/lib/php/session) in Unknown on line 0


Решение - проверить/создать папку tmp для хранения файлов сессий:

# mkdir /var/tmp/php5_sessions
# chmod 777 /var/tmp/php5_sessions
# chmod +t /var/tmp/php5_sessions
Индекс цитирования