dfernandezm / download-utils

Several utilities to organize downloads
MIT License
0 stars 0 forks source link

Increase and detect session timeout properly #46

Open dfernandezm opened 9 years ago

dfernandezm commented 9 years ago

http://stackoverflow.com/questions/15514164/when-the-session-expires-how-can-i-force-the-user-logout

http://stackoverflow.com/questions/10846970/catch-session-timeout-symfony2

dfernandezm commented 8 years ago

This is the actual error, which shows an underlying issue about permissions on (/var/lib/php5/sessions) either this directory should be writable by the services user or the sessions stored somewhere else.

 (parameters: "_controller": "Morenware\DutilsBundle\Controller\TorrentApiController::torrentsStatusAction", "_route": "morenware_dutils_torrentapi_torrentsstatus") [] []
[2015-10-15 12:04:44] request.CRITICAL: Uncaught PHP Exception Symfony\Component\Debug\Exception\ContextErrorException: "Notice: SessionHandler::gc(): ps_files_cleanup_dir: opendir(/var/lib/php5/sessions) failed: Permission denied (13)" at /var/www/dutils/releases/20151015073503/app/cache/dev/classes.php line 421 {"exception":"[object] (Symfony\\Component\\Debug\\Exception\\ContextErrorException(code: 0): Notice: SessionHandler::gc(): ps_files_cleanup_dir: opendir(/var/lib/php5/sessions) failed: Permission denied (13) at /var/www/dutils/releases/20151015073503/app/cache/dev/classes.php:421)"} []
dfernandezm commented 8 years ago

Moving to the backlog for now as the main issue was early session timeouts. This seems to be fixed by changing the permissions of /var/lib/php5/sessions and fixing the typo in Apache envvars. Still need to create a listener for a graceful handle of a proper session timeout, but it is not a top priority right now