PHP error caused by insufficient session folder permissions

Source: Internet
Author: User
The gunicorn error caused by insufficient session folder permissions in PHP was rolled over before all other websites on the server went down. Several of the websites reported the following errors:

Warning: Unknown: open (/var/lib/php/session/Unknown, O_RDWR) failed: Permission denied (13) 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

I did not remember the phpMyAdmin error. I just searched it and translated it as "the session cannot be created when an error occurs. Please check the PHP or website server log and correctly configure PHP installation ."

After carefully reading the report, the first long string of errors is divided into two sections, one for access failure and the other for session writing failure. Phpmyadmin error is also caused by session creation failure. So I found php. ini and wrote it well:

Session. save_path =/var/lib/php/session

This folder does exist, so it should be a permission issue. Therefore

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

Solve the problem.

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.