- Centos 7 (latest update)
- Apache 2.4.6
- PHP 7.2
I would like to change the directory where sessions stored on the server, the default directory is
/var/lib/php/session/, I can use this directory without any problem, but when I change the directory in
PHP.ini file, I get an error :
session_start(): open(/var/www/session/sess_dug784eu96aj06eh1gte4hak2f, O_RDWR) failed: Permission denied (13)
I also edited
/etc/httpd/conf.d and removed this line To stop session directory from being overridden :
php_value session.save_path "/var/lib/php/session"
As you can see, I use
/var/www/session/ as new directory to store sessions and this directory exist and have exactly same Permission as default directory :
0770 / owner : root / group : Apache
I also tried to copy the existing session file from default directory to the new directory, but I still get same error !
Thank you for your help.