I have an strange issue related with PHP an the session save path. I have configured in my php.ini the session.save_path = "/tmp", and I know that is correctly configured since in the server I could type the following command and the command result seems to be fine.
$ php -i | grep session.save_path
session.save_path => /tmp => /tmp
However, when I am trying to start a session from php code, I am getting the following error:
Warning: session_start(): open(/var/lib/php/session/sess_7ktfe84jqca3ga6ftk6fsrurv6, O_RDWR) failed: Permission denied (13)
So the path here is totally different from /tmp configured in php.ini.
Is there any reason for this behavior? I have checked that in my code there is no any call to session_save_path to change the default save path.
The server with this problem is an AWS EC2 instance.
php -r
or through a web server?php.ini
... and you'll usually need to restart the web server after making changes.