On Tue, July 17, 2007 5:30 am, Phil Princely wrote:
> 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

If you have .htaccess, do this, only use the right line which is more
like:

php_value 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.

This is more useful if you have no .htaccess

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to