An error is reported when session_start () is used to compile and install PHP. the solution is to compile and install PHP on the system. an error is reported when session_start () is used!
A error message:
Warning: session_start (): open (/var/lib/php/session/sess_qavhhacl7lrdbggauasf1qdlo5, O_RDWR) failed: No such file or directory (2) in/www/tool/classes/service/User. php on line 75
1
Warning: Unknown: open (/var/lib/php/session/sess_qavhhacl7lrdbggauasf1qdlo5, O_RDWR) failed: No such file or directory (2) in Unknown on line 0
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
B. View php. ini:
Session. save_path = "/var/lib/php/session" // session storage path
Therefore, the above text indicates that the directory does not exist.
C. solve the problem:
Create the preceding Directory
Mkdir session
Chmod-R 777 session
Run the program again.
D. view more information:
(1)
Pwd
/Var/lib/php/session
? Session ls
Sess_qavhhacl7lrdbggauasf1qdlo5
(2)
Use firebug to view cookies:
PHPSESSID qavhhacl7lrdbggauasf1qdlo5 // php. ini session. name = PHPSESSID