Linux lhjmq-records 5.15.0-118-generic #128-Ubuntu SMP Fri Jul 5 09:28:59 UTC 2024 x86_64
Your IP : 18.119.28.173
<?php
// Fix PHP > 5.4
// Simon 20171013
// http://php.net/manual/en/function.session-register.php
// https://stackoverflow.com/questions/3682615/how-to-fix-the-session-register-deprecated-issue
// Fix for removed Session functions
function fix_session_register(){
function session_register(){
$args = func_get_args();
foreach ($args as $key){
$_SESSION[$key]=$GLOBALS[$key];
}
}
function session_is_registered($key){
return isset($_SESSION[$key]);
}
function session_unregister($key){
unset($_SESSION[$key]);
}
}
if (!function_exists('session_register')) fix_session_register();
$session_id_usager = $_SESSION['session_id_usager'];
$session_username = $_SESSION['session_username'];
// http://php.net/manual/en/security.globals.php
/* Forces all GET and POST globals to register and be magically quoted.
* This forced register_globals and magic_quotes_gpc both act as if
* they were turned ON even if turned off in your php.ini file.
*
* Reason behind forcing register_globals and magic_quotes is for legacy
* PHP scripts that need to run with PHP 5.4 and higher. PHP 5.4+ no longer
* support register_globals and magic_quotes, which breaks legacy PHP code.
*
* This is used as a workaround, while you upgrade your PHP code, yet still
* allows you to run in a PHP 5.4+ environment.
*
* Licenced under the GPLv2. Matt Kukowski Sept. 2013
*/
if (! isset($PXM_REG_GLOB)) {
$PXM_REG_GLOB = 1;
if (! ini_get('register_globals')) {
foreach (array_merge($_GET, $_POST) as $key => $val) {
global $$key;
$$key = (get_magic_quotes_gpc()) ? $val : addslashes($val);
}
}
if (! get_magic_quotes_gpc()) {
foreach ($_POST as $key => $val) $_POST[$key] = addslashes($val);
foreach ($_GET as $key => $val) $_GET[$key] = addslashes($val);
}
}
?>
|