Migrating symfony apps to php 7 with no success.
Error messages:
Symfony 2.8:
Warning: session_write_close(): Failed to write session data (user). Please verify that the current setting of session.save_path is correct (/var/lib/php/sessions)
Symfony 3.1:
Warning: session_regenerate_id(): Session object destruction failed. ID: user (path: /var/lib/php/sessions)
Problem
Now from the message I would guess php is trying to write sessions to files.
- I use memcached handler for sessions, it is running and works with php 5.6.
- If I use
native_file
handler - everything works.
I do not know how to make any sense from this. All answers I found to similar problems include switching from native_file to memcached (already using it), changing user and/or permissions for session dir (does not matter?), updating session handler to return true from some methods (updated and checked).
dump(ini_get('session.save_handler'));
command ? – AlterPHPuser
, changed to native_file and to memcached again - now it works! Not sure what happened, but other app on same server also started to work, nothing was changed, updated or anything. Will do more testing. – Aurelijus Rozenas