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,15 +43,16 @@ if (!isset($_SERVER["REQUEST_URI"])) {
|
||||||
$_SERVER["REQUEST_URI"] = $_SERVER["ORIG_PATH_INFO"] . ($_SERVER["QUERY_STRING"] != "" ? "?$_SERVER[QUERY_STRING]" : "");
|
$_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
|
@ini_set("session.use_trans_sid", false); // protect links in export, @ - may be disabled
|
||||||
session_name("adminer_sid"); // use specific session name to get own namespace
|
if (!ini_get("session.auto_start")) {
|
||||||
$params = array(0, preg_replace('~\\?.*~', '', $_SERVER["REQUEST_URI"]), "", $_SERVER["HTTPS"] && strcasecmp($_SERVER["HTTPS"], "off"));
|
session_name("adminer_sid"); // use specific session name to get own namespace
|
||||||
if (version_compare(PHP_VERSION, '5.2.0') >= 0) {
|
$params = array(0, preg_replace('~\\?.*~', '', $_SERVER["REQUEST_URI"]), "", $_SERVER["HTTPS"] && strcasecmp($_SERVER["HTTPS"], "off"));
|
||||||
$params[] = true; // HttpOnly
|
if (version_compare(PHP_VERSION, '5.2.0') >= 0) {
|
||||||
|
$params[] = true; // HttpOnly
|
||||||
|
}
|
||||||
|
call_user_func_array('session_set_cookie_params', $params); // ini_set() may be disabled
|
||||||
|
session_start();
|
||||||
}
|
}
|
||||||
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
|
// disable magic quotes to be able to use database escaping function
|
||||||
if (get_magic_quotes_gpc()) {
|
if (get_magic_quotes_gpc()) {
|
||||||
|
|
Loading…
Reference in a new issue