note 31898 deleted from configuration by vincent

From: Date: Sun, 14 Sep 2003 10:37:44 +0000
Subject: note 31898 deleted from configuration by vincent
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-56466@lists.php.net to get a copy of this message
Note Submitter: allen AT brooker DOT G(ee)B(ee) DOT net ---- In reference to the post by php dot net at odi dot ch Yes magic_quotes is slightly evil, but we have to live with it, and to be honest its not a problem, I now have a file which runs these sorts of chekcs thats included at the beginning of the script. My code for magic quotes looks like this: // 'Turn off' magic_quotes_gpc if (get_magic_quotes_gpc ()) { foreach ($_POST as $key => $value) { $_POST[$key] = stripslashes ($value); } foreach ($_GET as $key => $value) { $_GET[$key] = stripslashes ($value); } foreach ($_COOKIE as $key => $value) { $_COOKIE[$key] = stripslashes ($value); } } So saying that the behavious cannot be modified at runtime is actually incorrect. I'm even creating a new template database script which allows me to easily work around the more evil magic_quotes_runtime by writing my own database routines (the script is in fact designed for small databases and can be run either using flatfiles or MySQL). It would make my life way easier if they removed safe mode from PHP, but it isn't going to happen. Live with it and love it :) Allen

« previous php.notes (#56466) next »