From 1a035873dc79d04ffbf155a874e3eeed8eaa8c20 Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Wed, 6 May 2015 18:42:42 +0200 Subject: [PATCH] Fixed the PHP Warnings about the re-start the session. --- pandora_console/include/config_process.php | 4 +++- pandora_console/include/functions.php | 4 +++- pandora_console/index.php | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index fb5605b44c..35db109620 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -120,7 +120,9 @@ config_process_config(); config_prepare_session(); require_once ($config["homedir"].'/include/load_session.php'); -$resultado = session_start(); +if(session_id() == '') { + $resultado = session_start(); +} if (!isset($config["homeurl_static"])) { diff --git a/pandora_console/include/functions.php b/pandora_console/include/functions.php index e8cdef04b1..c3c234e185 100644 --- a/pandora_console/include/functions.php +++ b/pandora_console/include/functions.php @@ -1691,7 +1691,9 @@ function check_login ($output = true) { } else { require_once($config["homedir"].'/mobile/include/user.class.php'); - session_start (); + if(session_id() == '') { + session_start (); + } session_write_close (); if (isset($_SESSION['user'])) { $user = $_SESSION['user']; diff --git a/pandora_console/index.php b/pandora_console/index.php index 196ef0f5f3..45826477e5 100755 --- a/pandora_console/index.php +++ b/pandora_console/index.php @@ -66,7 +66,9 @@ if ((! file_exists ("include/config.php")) || (! is_readable ("include/config.ph } // Real start -session_start (); +if(session_id() == '') { + session_start (); +} require_once ("include/config.php");