Re: Inserting single quotes
| From: | skip evans | Date: | Sat, 07 Jul 2007 04:53:07 +0000 |
| Subject: | Re: Inserting single quotes | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-258446@lists.php.net to get a copy of this message | ||
Yes, it turns out the production server did not have a php.ini file!!!
I copied the php.ini-recommended file into place, and it has magic_quotes_gpc off and that did the trick.
Thanks much!
Skip
Chris wrote:
The ini setting is magic_quotes_gpc ( http://www.php.net/ref.info#ini.magic-quotes-gpc ). If that doesn't work the it's mostly like an issue in your code, make sure there aren't any differences. Chris skip evans wrote:-- Skip Evans Big Sky Penguin 61 W Broadway Butte, Montana 59701 =-=-=-=-=-=-=-=-=-=- Check out PHPenguin, a versatile and lightweight code base for developing PHP/MySQL applications. phpenguin.bigksypenguin.comI'm sorry, I totally misnamed the subject of this email. It's the slashes that are getting inserted, but as I said only on one server, not the other. So I don't want to change the code, if I can help it. I hope there is a setting that will prevent this from happening. Skip base64 wrote:try this : <? $str = "\'u\',0,\'account\',1"; echo stripslashes($str); ?> On 7/6/07, skip evans <skip@bigskypenguin.com> wrote:Hey all, I have the following in a text field in the database. 'u',0,'account',1 One my dev server if I update this in the database I get the same string. On my production server I get this: \'u\',0,\'account\',1 I thought setting magic_quotes=Off would disable this, but it did not. Can someone tell me what does this and how to disable it? Thanks! -- Skip Evans Big Sky Penguin 61 W Broadway Butte, Montana 59701 =-=-=-=-=-=-=-=-=-=- Check out PHPenguin, a versatile and lightweight code base for developing PHP/MySQL applications. phpenguin.bigksypenguin.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php