I have a Zend Framework 1 (ZF1) application running in a Docker container with PHP 7.1.9-1. Now I have updated such container and the PHP version has changed to 7.1.11-1. For some reason unknow to me the application has stopped working (I got a blank page) and the only error I can see is:
[Sat Nov 04 16:05:45.500626 2017] [php7:notice] [pid 61] [client 172.18.0.1:49356] PHP Warning: session_write_close(): Failed to write session data using user defined save handler. (session.save_path: /var/lib/php/sessions) in /var/www/html/vendor/zendframework/zendframework1/library/Zend/Session.php on line 732
[Sat Nov 04 16:05:45.500637 2017] [php7:notice] [pid 61] [client 172.18.0.1:49356] PHP Stack trace:
[Sat Nov 04 16:05:45.500653 2017] [php7:notice] [pid 61] [client 172.18.0.1:49356] PHP 1. Zend_Session_SaveHandler_DbTable->__destruct() /var/www/html/vendor/zendframework/zendframework1/library/Zend/Session/SaveHandler/DbTable.php:0
[Sat Nov 04 16:05:45.500658 2017] [php7:notice] [pid 61] [client 172.18.0.1:49356] PHP 2. Zend_Session::writeClose($readonly = *uninitialized*) /var/www/html/vendor/zendframework/zendframework1/library/Zend/Session/SaveHandler/DbTable.php:217
[Sat Nov 04 16:05:45.500661 2017] [php7:notice] [pid 61] [client 172.18.0.1:49356] PHP 3. session_write_close() /var/www/html/vendor/zendframework/zendframework1/library/Zend/Session.php:732
I know there is a lot of info about this but nothing I have tried did work for me. Some of them are:
- error in zend session database for php7
- https://github.com/zendframework/zf1/issues/665#issue-127528467
- PHP7 + Symfony 2.8, Failed to write session data
This is how the Session Save Handler has been setup in the bootstrap.php
file as explained here in docs:
$config = [
'name' => 'session',
'primary' => 'id',
'modifiedColumn' => 'modified',
'dataColumn' => 'data',
'lifetimeColumn' => 'lifetime',
];
Zend_Session::setSaveHandler(new Zend_Session_SaveHandler_DbTable($config));
Zend_Session::start();
I did know also that ZF1 reached it's EOL recently and there is no support but for now I can get rid of ZF1 on my application and I do not want to go back to PHP5.
My guess is something has changed between 7.1.9 and 7.1.10 but I don't have a clue about it.
Any ideas in what could be going wrong here?