Php session.save.path that is not from the ini file

php.inisession

I have set up a custom php.ini for a dev site (the production site will eventually be on the same server) – it sets the session.save path to a directory specific to the site.

You can see the result at https://dev.permaculture.org.nz/info1.php (will be moved or removed once problem is solved).

However, I am still getting permission denied errors for session files attempting to be written to /var/lib/php/session
Firstly, I can't understand why the "Master" and "local" values aren't the other way round.
Secondly, I've no idea where the "local" value for session.save.path is coming from:
I have located three php.ini files on the server:
/etc/php.ini
/opt/remi/php56/root/etc/php.ini
/var/www/dev.permaculture.org.nz/etc/php.ini

The second uses /tmp, and I've also set the first to /tmp
The third specifies /var/www/dev.permaculture.org.nz/php/session – which is, as required, owned by the process owner.

The errors are causing a fatal error for phpmyadmin.

Best Answer

Solved after further research (https://stackoverflow.com/questions/19520744/what-is-the-difference-between-local-value-and-master-value)

The overriding setting was in /etc/httpd/conf.d/php.conf While that has comments that it is overridden by individual virtualhost directives, it appears that php.ini settings do not override. The problem vanished when I commented it out.