I\'m running a website with a nginx server with PHP Fastcgi on a VPS. I tried to configure the php.ini (in /etc/php5/cgi) to have PHP session last longer than 3 days (259200
To help you debug, you can check the current setting that the PHP cron job is "seeing" by executing:
/usr/lib/php5/maxlifetime
The maxlifetime script searches all your php.ini files for the session.gc_maxlifetime and uses the largest value. The value printed is in minutes.
This sounds a bit like Ubuntu or Debian on the server. If I rememeber correctly there is a cronjob somewhere (installed either by the php5 or the php5-common package) which cleans out your session directory more often.
I'd recommend you configure your sessions to be saved somewhere else (than the default). Adjust session.save_path
and verify to cronjob doesn't empty it.
The cronjob is somewhere like /etc/cron.d/php
- to be certain, run dpkg -L php5
or dpkg -L php5-common
. Assuming you are on Ubuntu (or Debian) this should show you the location of all installed files.