php-fpm and nginx session problems

I found that my php.ini was attempting to save sessions to /var/lib/php/session rather than /tmp

So check your ini file and see where they're being saved to (or set it to somewhere else); then make sure that directory is writeable by the appropriate processes


Just change the ownership of /var/lib/php/session/ to nginx from apache instead of giving a world read.

sudo chown -R nginx:nginx /var/lib/php/session/

Tags:

Nginx

Php

Session