Errors are reported when session_start () is used to compile and install PHP. & Solution-php Tutorial

Source: Internet
Author: User
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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.