nginx / php / php-fpm | Problem with storing cookies nginx / php / php-fpm | Problem with storing cookies nginx nginx

nginx / php / php-fpm | Problem with storing cookies


The various session cookie parameters are all documented here.

In particular, check the "session.use_cookies", "session.use_only_cookies", and "session.trans_sid" settings. If PHP can't succesfully create a cookie, it'll fall back to the trans_sid method (which is what you're seeeing: the session ID being passed around as a query/form variable).

You can trivially check if any cookie-related headers are going out by using Firebug and HTTPFox in Firefox. Both let you view the incoming/outgoing headers for requests.


May be some usefull information can be found in PHP-fpm error log? Set parameters in php.ini

error_reporting = E_ALL & ~E_DEPRECATEDlog_errors = Onerror_log = ;

some file php can write in or "syslog"

Also try to look in nginx error log.

Does PHP-fpm process-owner has write permissions to sessions dir? See session.save_path on php.ini for session dir


See if your session_path is correct and has the right permissions. That fixed my problem.