Respect session.auto_start (bug #2967284)
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@1360 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
parent
640d0ec08d
commit
2840567e9f
|
@ -43,8 +43,8 @@ if (!isset($_SERVER["REQUEST_URI"])) {
|
|||
$_SERVER["REQUEST_URI"] = $_SERVER["ORIG_PATH_INFO"] . ($_SERVER["QUERY_STRING"] != "" ? "?$_SERVER[QUERY_STRING]" : "");
|
||||
}
|
||||
|
||||
session_write_close(); // disable session.auto_start
|
||||
@ini_set("session.use_trans_sid", false); // protect links in export, @ - may be disabled
|
||||
if (!ini_get("session.auto_start")) {
|
||||
session_name("adminer_sid"); // use specific session name to get own namespace
|
||||
$params = array(0, preg_replace('~\\?.*~', '', $_SERVER["REQUEST_URI"]), "", $_SERVER["HTTPS"] && strcasecmp($_SERVER["HTTPS"], "off"));
|
||||
if (version_compare(PHP_VERSION, '5.2.0') >= 0) {
|
||||
|
@ -52,6 +52,7 @@ if (version_compare(PHP_VERSION, '5.2.0') >= 0) {
|
|||
}
|
||||
call_user_func_array('session_set_cookie_params', $params); // ini_set() may be disabled
|
||||
session_start();
|
||||
}
|
||||
|
||||
// disable magic quotes to be able to use database escaping function
|
||||
if (get_magic_quotes_gpc()) {
|
||||
|
|
Loading…
Reference in a new issue