The session cannot be created when an error occurs. check the PHP or website server logs and correctly configure the PHP installation (win + linux) _ PHP Tutorial.

Source: Internet
Author: User
You cannot create a session when an error occurs. check the PHP or website server logs and correctly configure PHP installation (win + linux ). Solution in windows: Find the session. save_path path of php. ini and check whether this directory exists or whether the directory has the write permission for everyone or AuthenticatedUsers. Solution in windows:

Find the path of session. save_path = "" in php. ini and check whether this directory exists or whether the directory has write permissions for everyone or Authenticated Users. Generally

Solution in linux:

After updating PHP today, The phpmyadmin configured in the result is logged in, "You cannot create a session when an error occurs. check the PHP or website server logs and correctly configure PHP installation ." .

Error cause:

After php is updated, the original/var/lib/php/session permissions are overwritten. This error occurs because apache users cannot write data to the session.

Solution:
Run: # chown-R root: username/var/lib/php/session

Here, username is the bearer user of apache, and my is apache, so the command to be executed is:
# Chown-R root: apache/var/lib/php/session

If the error message appears at this time, we recommend that you:
# Chmod-R 777/var/lib/php/session

For fear that 777 of permissions are too large, the above problems cannot be solved by testing 770, 766, and 776, so we have to grant 777 permissions first.
I don't know if there will be any security risks during the trial. please write down this location first.

The supervisor finds the path of session. save_path = "" in php. ini and checks whether this directory exists or whether the directory has the write permission for everyone or Authenticated Users...

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.