Jim Lucas wrote:
Here is a nice little hack that I use.
"Little hack" it is, "nice" it isn't.
Ideally just turn off magic_quotes_gpc - you can do so in php.ini, or
perhaps your web server configuration files (httpd.conf, .htaccess etc.).
If you don't have access to any of the above then install the latest
version of PHP_Compat (http://pear.php.net/package/PHP_Compat) and
include 'PHP/Compat/Environment/magic_quotes_gpc_off.php'. Reversing the
effects of magic_quotes_gpc at runtime is far from trivial, there's lots
of potential for subtle bugs, let alone completely forgetting about
$_COOKIE.
If you're unable to install PHP_Compat, you can grab the relevant files
from CVS:
http://cvs.php.net/viewvc.cgi/pear/PHP_Compat/Compat/Environment/_magic_quotes_inputs.php?revision=1.3&view=markup
http://cvs.php.net/viewvc.cgi/pear/PHP_Compat/Compat/Environment/magic_quotes_gpc_off.php?revision=1.7&view=markup
Arpad
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php