Skip to content
Snippets Groups Projects
Commit d521f431 authored by Laurent's avatar Laurent
Browse files

dev #141983 on Zend_Session start error, automatically reload the page

parent 5749c0d5
Branches
Tags
3 merge requests!4234Master,!4232Hotline,!4222dev #141983 on Zend_Session start error, automatically reload the page
Pipeline #14827 failed with stage
in 1 hour and 23 minutes
- ticket #141983 : Rechargement automatique de la page lorsque la session n'a pu être ouverte
\ No newline at end of file
......@@ -202,14 +202,30 @@ class Bokeh_Engine {
function setupSession() {
// Start Session
$session = new Zend_Session_Namespace(md5(BASE_URL));
if (!isset($session->initialized))
{
Zend_Session::regenerateId();
$session->initialized = true;
}
if (!isset($session->baseUrl)) $session->baseUrl = BASE_URL;
try {
$session = new Zend_Session_Namespace(md5(BASE_URL));
} catch (Zend_Session_Exception $e) {
header('HTTP/1.1 503 Service Unavailable');
echo '<html>'
. '<body style="text-align:center">'
. '<img src="' . URL_SHARED_IMG . '/patience.gif' . '" />'
. 'Attente de connexion...'
. '<script>'
. 'setTimeout(() => window.location.reload(),5000);'
. '</script>'
. '</body>'
.'</html>';
exit();
}
if (!isset($session->initialized)) {
Zend_Session::regenerateId();
$session->initialized = true;
}
if (!isset($session->baseUrl))
$session->baseUrl = BASE_URL;
Zend_Registry::set('session', $session);
return $this;
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment