ZF-7915: Check session_set_save_handler() and throw exception if it failed to set saveHandler

Description

If session is already started, Zend_Session::setSaveHandler(new Zend_Session_SaveHandler_DbTable()) silently fails to set session_set_save_handler(), but Zend_Session::getSaveHandler() shows that saveHander is set successfully. I added 2 checks to ensure that session was not started before and session_set_save_handler() successfully changed saveHandler.

Comments

Diff attached.

Still not fixed? Issue is pretty reasonable. I have been wondering, why my session db table is empty while php sessions were working. I.e. calling session_start() before setting save handler causes session save handler to fail silently.

What can be done to have this fixed?