php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #50222 can't disable magic_quotes_gpc support
Submitted: 2009-11-18 23:21 UTC Modified: 2009-11-19 10:24 UTC
From: carlo dot mendola at gmail dot com Assigned:
Status: Not a bug Package: *Configuration Issues
PHP Version: 5.3.0 OS: mac os x 10.6 snow leopard
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
47 - 11 = ?
Subscribe to this entry?

 
 [2009-11-18 23:21 UTC] carlo dot mendola at gmail dot com
Description:
------------
i got a problem with mysql_real_escape_string because of this 
assignment:

$myvar=mysql_real_escape_string($_POST['key']);

the value in $_POST['key'] contains a string already escaped.
I think it might be due to magic_quotes_gcp settings.

the phpinfo() tells that magic_quotes_gpc is On for both master and 
local value.

The php.ini.default has the following settings:
; magic_quotes_gpc
;   Default Value: On
;   Development Value: Off
;   Production Value: Off
magic_quotes_gpc = Off
magic_quotes_runtime = Off
magic_quotes_sybase = Off




Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-11-19 08:36 UTC] jani@php.net
So turn it off in php.ini and you're done.
 [2009-11-19 09:34 UTC] carlo dot mendola at gmail dot com
1) the php.ini that were you referring to are the same php.ini.default i 
found in /etc or there is another one to modify?

2) my php.ini.default has already magic_quotes_gpc disabled as you can 
see in my previous post.
   magic_quotes_gpc = Off
what else am i supposed to do to disable magic_quotes_gpc?

3) my phpinfo() report tells (none) as you can see beneath 
Configuration File (php.ini) Path	/etc
Loaded Configuration File	(none)
Scan this dir for additional .ini files	(none)
Additional .ini files parsed	(none)

Could it be related to my problem?
 [2009-11-19 09:51 UTC] philip@php.net
Basically this is saying that PHP is looking for /etc/php.ini but not 
finding it. 

And it's looking for php.ini not php.ini-default. So, rename it, then 
restart the web server...
 [2009-11-19 10:24 UTC] carlo dot mendola at gmail dot com
ok, problem solved renaming the php.ini file.

Thanks
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Fri Aug 12 00:03:34 2022 UTC