Error:Unknown: open(/var/lib/php/session/sess_…

I’ve installed php and apache through yum in centos5.5 , php webpage like phpMyAdmin and Modx CMS fail to run with below PHP error

PHP error debug
Error:Unknown: open(/var/lib/php/session/sess_f1i4m7iirlv2g4rne8sq3qonc7, O_RDWR) failed: Permission denied (13)

Here is the screen dump for Modx php error :


Fix will be

1. change session.save_path in /etc/php.ini to somewhere everybody can write to , e.g. /tmp


2. chmod 4777 /var/lib/php/session

I never met this problem before probably because I always manually compiled and installed php , and this session permission problem does not appear with that .

You may also like...