Index: kernel/application.php =================================================================== --- kernel/application.php (revision 14184) +++ kernel/application.php (working copy) @@ -2191,7 +2191,6 @@ } } - ob_end_flush(); // session expiration is called from session initialization, // that's why $this->Session may be not defined here $session =& $this->Application->recallObject('Session'); @@ -2199,6 +2198,8 @@ $this->HandleEvent( new kEvent('adm:OnBeforeShutdown') ); $session->SaveData(); + + ob_end_flush(); exit; }