PHP session_start () open failed: Permission denied session unusable issues

Log shows given as follows:

PHP message: PHP Warning:  session_start(): open(/var/lib/php/session/sess_tbh109lbvm6lu8cm7pr31ik, O_RDWR) failed: Permission denied (13) in /home/domain.com/html/index.php on line 2

 

Seesion display error can not open the file, you do not have permission, so it is necessary to / var / lib / php / session / add permissions

You can set permissions to read and write directly

chmod -R 777 /var/lib/php/session/

Seesion storage path or reset, modifications in php.ini 

session.save_path =

Revised to  / home / tmp /, and set permissions 0777 

session.save_path = '/home/tmp/'
chmod -R 777 /home/tmp/

 

 

Reference links:

http://help.phpmelody.com/how-to-fix-warning-session_start-function-session-start-opentmpsess_-o_rdwr-failed/

Guess you like

Origin www.cnblogs.com/ryanzheng/p/11592303.html