Re: magic quotes
| From: | Richard Lynch | Date: | Tue, 17 Jul 2007 23:13:11 +0000 |
| Subject: | Re: magic quotes | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-259053@lists.php.net to get a copy of this message | ||
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?