When doing development, you sometimes encounter this problem when operating sessions: Warning: session_start() [function.session-start]......
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 the codeThe code is as follows:
Warning:session_start() [function.session-start]:open(/var/lib/php/session/sess_itqfqua1554rmkgcb8u89ujem5,O_RDWR) failed:Permission denied(13)in www_path on line 9
Warning:Unknown:open(/var/lib/php /session/sess_itqfqua1554rmkgcb8u89ujem5,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.sav_path is correct (/var /lib/php/session)in Unknown on line 0
Solution:
Method 1. Comment out
session.save_path = “/var/lib/php/session” in /etc/php.ini
Method 2, View the apache user and group, and then add the user to the group where the session folder is located.
Method 3, don’t have any output before session_start()!
Then restart Apache;
OK, the problem is solved!
http://www.bkjia.com/PHPjc/764622.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/764622.htmlTechArticleWhen developing, sometimes you will encounter this problem when operating the session: Warning: session_start() [function.session -start]... PHP environment: OS: CentOS release 5.2 (Final) Apache: Server...