When doing development, the operation session sometimes encounters this problem: Warning:session_start () [Function.session-start] ...
System Environment: win2003+iis6+php5.2.12
PHP appears similar to the following error:
Warning:session_start () [Function.session-start]: ... failed:no such file or directory ... and other circumstances,
You can try it. Change the Session.auto_start = 0 in the php.ini file to Session.auto_start = 1
If the problem persists after restarting IIS,
That is, the session variable requires the system's temporary file space and requires read and write permissions.
Find Session.save_path in php.ini =, set a valid folder path,
For example: Session.save_path = "C:\php5\session_temp" and add permissions to the folder so that everyone has permission to modify the write.
PHP Environment:
Os:centos Release 5.2 (Final)
Apache:
Server version:apache/2.2.3
Server Built:jan 15 2008 20:33:30
Php:
PHP 5.1.6 (CLI) (Built:may 24 2008 14:07:53)
Copyright (c) 1997-2006 the PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies
The error message is as follows:
Copy Code code as follows:
Warning:session_start () [Function.session-start]:open (/var/lib/php/session/sess_itqfqua1554rmkgcb8u89ujem5,o_ RDWR) Failed:permission denied (Www_path on line 9
Warning:Unknown:open (/VAR/LIB/PHP/SESSION/SESS_ITQFQUA1554RMKGCB8U89UJEM5,O_RDWR) Failed:permission denied (a) in Unknown on line 0
Warning:Unknown:Failed to write session data (files); Please verify this current setting of Session.sav_path is correct (/var/lib/php/session) in Unknown on line 0
Solution:
Method 1, comment out the/etc/php.ini
Session.save_path = "/var/lib/php/session"
Method 2, view the Apache users and groups, and then add the user to the group where the session folder is.
Method 3, do not have any output before session_start ()!
then restart Apache;
OK, problem solved!