Closed xchs closed 9 years ago
To test this further, I have set the session timeout to 120 seconds and got the following error message when the session expires:
[1] Symfony\Component\Debug\Exception\ContextErrorException: Notice: SessionHandler::gc(): ps_files_cleanup_dir: opendir(/var/lib/php-sessions) failed: Permission denied (13)
at n/a
in /var/www/contao4/develop/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Proxy/SessionHandlerProxy.php line 93
at Symfony\Component\Debug\ErrorHandler->handleError('8', 'SessionHandler::gc(): ps_files_cleanup_dir: opendir(/var/lib/php-sessions) failed: Permission denied (13)', '/var/www/contao4/develop/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Proxy/SessionHandlerProxy.php', '93', array('maxlifetime' => '1440'))
in line
at SessionHandler->gc('1440')
in /var/www/contao4/develop/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Proxy/SessionHandlerProxy.php line 93
at Symfony\Component\HttpFoundation\Session\Storage\Proxy\SessionHandlerProxy->gc('1440')
in line
at session_start()
in /var/www/contao4/develop/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php line 148
at Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage->start()
in /var/www/contao4/develop/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php line 262
at Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage->getBag('attributes')
in /var/www/contao4/develop/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Session.php line 81
at Symfony\Component\HttpFoundation\Session\Session->has('_locale')
in /var/www/contao4/develop/vendor/contao/core-bundle/src/EventListener/LocaleListener.php line 65
at Contao\CoreBundle\EventListener\LocaleListener->getLocale(object(Request))
in /var/www/contao4/develop/vendor/contao/core-bundle/src/EventListener/LocaleListener.php line 46
at Contao\CoreBundle\EventListener\LocaleListener->onKernelRequest(object(GetResponseEvent), 'kernel.request', object(TraceableEventDispatcher))
in line
at call_user_func(array(object(LocaleListener), 'onKernelRequest'), object(GetResponseEvent), 'kernel.request', object(TraceableEventDispatcher))
in /var/www/contao4/develop/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Debug/WrappedListener.php line 61
at Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke(object(GetResponseEvent), 'kernel.request', object(ContainerAwareEventDispatcher))
in line
at call_user_func(object(WrappedListener), object(GetResponseEvent), 'kernel.request', object(ContainerAwareEventDispatcher))
in /var/www/contao4/develop/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/EventDispatcher.php line 164
at Symfony\Component\EventDispatcher\EventDispatcher->doDispatch(array(object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener)), 'kernel.request', object(GetResponseEvent))
in /var/www/contao4/develop/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/EventDispatcher.php line 53
at Symfony\Component\EventDispatcher\EventDispatcher->dispatch('kernel.request', object(GetResponseEvent))
in /var/www/contao4/develop/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/ContainerAwareEventDispatcher.php line 167
at Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.request', object(GetResponseEvent))
in /var/www/contao4/develop/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcher.php line 124
at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch('kernel.request', object(GetResponseEvent))
in /var/www/contao4/develop/app/bootstrap.php.cache line 3017
at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), '1')
in /var/www/contao4/develop/app/bootstrap.php.cache line 2990
at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), '1', true)
in /var/www/contao4/develop/app/bootstrap.php.cache line 3139
at Symfony\Component\HttpKernel\DependencyInjection\ContainerAwareHttpKernel->handle(object(Request), '1', true)
in /var/www/contao4/develop/app/bootstrap.php.cache line 2383
at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
in /var/www/contao4/develop/web/app_dev.php line 31
The error message seems like a problem of your server, because the session directory is not writeable?
I'd have to observe this issue further. For the moment I cannot reproduce it either.
Fair enough, I'm going to close the ticket right now and I will get back as soon as it happens again.
For sessions that are invalidated or expired, the Contao login mask shows the last (?) notification from the back end: