magic quotes

From: Date: Tue, 17 Jul 2007 10:30:06 +0000
Subject: magic quotes
Groups: php.general 
Request: Send a blank email to php-general+get-258983@lists.php.net to get a copy of this message
Hi all, I've been having a problem with a setting on a test server and production server. My test server has magic_quotes_gpc off, but the production server has it turned on. I've no access to the php.ini for the production server and don't want to change the setting on my test server. Searching on the internet, I found some ways to deal with this kind of thing: use a .htaccess file to turn magic_quotes off by saving a text file with the line: magic_quotes_gpc off Or making a function to strip slashes like this: if (magic_quote_gpc()) { stripslashes_array($_GET); stripslashes_array($_POST); stripslashes_array($_REQUEST); stripslashes_array($_COOKIE); } What do people on this list usually do with this kind of problem. To me, the .htaccess seems the easiest solution, since I don't have to change any scripts. cheers Phil P.

« previous php.general (#258983) next »