LAMP Setup, PHP's session_start permission denied
Posted
by
Andrew
on Server Fault
See other posts from Server Fault
or by Andrew
Published on 2012-11-05T22:04:41Z
Indexed on
2012/11/05
23:04 UTC
Read the original article
Hit count: 268
permissions
|lamp
I'm trying to set up a development environment for a legacy system that runs CentOS 4.8, PHP 4.3.9, and MySQL 4.1.22. I'm matching OS and software versions to keep the development server as close to the production server as possible.
When I fire up PHPMyAdmin's setup script (version 2.11.10.1, of course) the installation errors out and I see these errors in my error log:
[client 172.18.141.74] PHP Warning: session_start(): open(/var/lib/php/session/sess_b5b90f86bd3dcfad315ff24cb7483a79, O_RDWR) failed: Permission denied (13) in /home/www/intranet/phpmyadmin/libraries/session.inc.php on line 87
[client 172.18.141.74] PHP Warning: Unknown(): open(/var/lib/php/session/sess_b5b90f86bd3dcfad315ff24cb7483a79, O_RDWR) failed: Permission denied (13) in Unknown on line 0
[client 172.18.141.74] PHP 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've done some searching on ServerFault and on teh Googles and I see that a common reason for this error is that the session.save_path isn't writable by the www user. I also found where in /etc/php.ini this URL is set: session.save_path. My session.save_path is set to:
session.save_path = /var/lib/php/session
I've since changed the owner and the group of /var/lib/php/session and still have the same error. Here's the result of ls -la for /var/lib/php
[root@localhost php]# ls -la
total 24
drwxrwxr-x 3 www www 4096 Oct 23 20:21 .
drwxr-xr-x 17 root root 4096 Oct 23 20:31 ..
drwxrwx--- 2 www www 4096 Jun 1 2009 session
...But I'm still getting the same error. Is there another possibility for why I'm getting this error?
© Server Fault or respective owner