Re: Escape problems...why?

From: Date: Fri, 23 Apr 2004 04:21:04 +0000
Subject: Re: Escape problems...why?
Groups: php.general 
Request: Send a blank email to php-general+get-184345@lists.php.net to get a copy of this message
Hey John, Thanks for replying. I cant use strip slashes because there are a number of scripts doing DB things and searching for all of them and modifying things just for one client can be a royal PITA. I tried to use "php_flag magic_quotes_gpc off" in the *existing* .htaccess file like so: php_flag magic_quotes_gpc off AuthUserFile /c36/admin/.htpasswd AuthGroupFile /dev/null AuthName "Password Protected Area" AuthType Basic <limit GET POST> require valid-user </limit> But then am getting a 500 error... any ideas? Thanks, Ryan On 4/23/2004 5:55:34 AM, John W. Holmes (holmes072000@charter.net) wrote: > Ryan A wrote: > > > For example this insert statement: > > insert into test_ing values('a','a','a','a') > > > > becomes: > > insert into test_ing values > > (\'a\',\'a\',\'a\',\'a\') > > > > I immediatly suspected "magic_quotes" but checked (via phpinfo) and see > that > > magic_quotes are off, as a safety precaution I even have > > "set_magic_quotes_runtime(0)" in the "config.php" file... > > I did see that "magic_quotes_gpc" is on, and then went to the PHP > online > > manual and it says this cant be fixed during runtime...? is this > the > > problem? if so how to fix it? > > _runtime() applies to data coming _out_ of a database within your > script. Answer is go turn magic_quotes_gpc OFF or use stripslashes() on > the data. > > -- > ---John Holmes... > > Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ > > php|architect: The Magazine for PHP Professionals - www.phparch.com

« previous php.general (#184345) next »