I have a CentOS 6 box running nginx and PHP 7.2.
My php 7.2 session files exist where I expect them to, in
/var/opt/remi/php72/lib/php/session
However, I've just noticed that a smaller number of them exist in
/tmp
I only have one version of php installed, running a number of sites. phpInfo();
reports the first directory for each site. I can't find any reference to /tmp
regarding sessions at all.
I have discovered that if I run php -r 'phpInfo();' | grep save_path
I get session.save_path => no value => no value
, so I guess that's causing it? I.e. my cron jobs are creating the empty session files.
Is this normal? If so, why? Why does php run from the command line not use the value set in php.ini?
Thanks