note 113106 deleted from security.globals by cmb

From: Date: Sun, 17 Jan 2021 13:57:07 +0000
Subject: note 113106 deleted from security.globals by cmb
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-216182@lists.php.net to get a copy of this message
Note Submitter: elitescripts2000 at yahoo dot com ---- <?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); } } ?>

« previous php.notes (#216182) next »