How to solve the Fatalerrorsession_start () error in PHP

Source: Internet
Author: User
This article describes how to solve the Fatalerrorsession_start () error in PHP. it focuses on the troubleshooting steps and can solve the error step by step. For more information, see Error message:

Fatal error: session_start () [function. session-start]: Failed to initialize storage module: files (path:) in C: \ usr \ phpMyAdmin \ libraries \ session. inc. php on line 75

I. modify the server configuration:

1. check the error. log (Apache2.2 \ logs) file to check whether an error report exists. Not found.

2. check whether the value of session. save_handler in php. ini is files.

3. check whether the session. save_path in the php. ini file has been commented out. If yes, remove the preceding ";".

4. change the path after save_path to an existing path, for example, "D: \ php \ temp"

5. check whether the properties of the temp folder are readable and writable.

6. restart the APACHE server. OK

II. change the session storage path in the php program

The code is as follows:


$ SessSavePath = dirname (_ FILE _). "/../cache/sessions /";
If (is_writeable ($ sessSavePath) & is_readable ($ sessSavePath ))
{
Session_save_path ($ sessSavePath); // key change session storage path
}

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.