diff --git a/boot.php b/boot.php index 208293a925..ecaa73e6a3 100644 --- a/boot.php +++ b/boot.php @@ -1698,7 +1698,9 @@ function login($register = false, $hiddens=false) { * @brief Used to end the current process, after saving session state. */ function killme() { - session_write_close(); + if (!get_app()->is_backend()) + session_write_close(); + exit; } diff --git a/index.php b/index.php index 6ce348eac5..13c3f6318f 100644 --- a/index.php +++ b/index.php @@ -489,7 +489,8 @@ if (isset($_GET["mode"]) AND ($_GET["mode"] == "raw")) { echo substr($target->saveHTML(), 6, -8); - session_write_close(); + if (!$a->is_backend()) + session_write_close(); exit; } @@ -514,5 +515,6 @@ if(!$template) { require_once($template); -session_write_close(); +if (!$a->is_backend()) + session_write_close(); exit; diff --git a/mod/hostxrd.php b/mod/hostxrd.php index 4121764f1a..647073b056 100644 --- a/mod/hostxrd.php +++ b/mod/hostxrd.php @@ -25,7 +25,6 @@ function hostxrd_init(&$a) { '$zot_post' => z_root() . '/post', '$bigkey' => salmon_key(get_config('system','site_pubkey')), )); - session_write_close(); exit(); }