Re: DB: does it check magic_quotes_gpc and automatically accomodate either ON or OFF?

From: Date: Thu, 01 Sep 2005 20:17:17 +0000
Subject: Re: DB: does it check magic_quotes_gpc and automatically accomodate either ON or OFF?
References: 1 2  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-20733@lists.php.net to get a copy of this message
On 9/1/05, l Burnerheimerton <lburnerheimerton@yahoo.com> wrote: > It looks like, from the reading I've done, that using > autoprepare and autoexecute, or placeholders in > general, will quote/escape as needed. > > Is that right? DB will use the quoteSmart method "automatically" when you use those methods, yes. This still has nothing to do with magic_quotes as DB doesn't deal with it. It's possible that it doesn't double-escape the slashes but if this is true it's incorrect behavior. Any string passed into a field should be entered as-is, including any \ or ' or " in it. Please understand that not only is magic_quotes broken from a workflow perspective, its quoting style is *incorrect* for some databases, such as Oracle (besides being incorrect for HTML, etc anyway). Again, please do not use magic_quotes. > > --- Justin Patrin <papercrane@gmail.com> wrote: > > > On 9/1/05, l Burnerheimerton > > <lburnerheimerton@yahoo.com> wrote: > > > I've searched the documentation and php files for > > > magic_quotes_gpc and found nothing. So hopefully > > you > > > guys can help me. > > > > > > I develop locally with magic_quotes_gpc=ON. I > > just > > > learned my host has magic_quotes_gpc=OFF (I > > haven't > > > uploaded anything yet so I didn't know). I can > > change > > > that setting and I've read both sides of that > > issue. > > > But it's really a mute point if Pear DB checks for > > the > > > setting of magic_quotes_gpc and determines how it > > will > > > escape or addslashes appropriately. > > > > > > So, will DB check this and make the needed > > > accomodations to allow for either > > magic_quotes_gpc=ON > > > or magic_quotes_gpc=OFF? > > > > > > > Why would DB deal with magic_quotes? DB is a > > database package, not a > > form package. The only package (AFAIK) which handles > > magic_quotes in > > PEAR is HTML_QuickForm and only if you use its data > > exporting > > functions. magic_quotes is bad. Period. It should > > never be used. Ever. > > It's the wrong solution to any problem. Please read > > my FAQ: > > > > http://pear.reversefold.com/dokuwiki/doku.php?id=phpfaqs#why_is_magic_quotes_gpc_bad > > > > -- > > Justin Patrin > > > > -- > > PEAR General Mailing List (http://pear.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > > -- > PEAR General Mailing List (http://pear.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Justin Patrin

« previous php.pear.general (#20733) next »