php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #48990 get_magic_quotes_gpc returns true (int 1)
Submitted: 2009-07-20 19:39 UTC Modified: 2009-07-21 10:09 UTC
From: troelskn at gmail dot com Assigned:
Status: Not a bug Package: PHP options/info functions
PHP Version: 5.3.0 OS: linux
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:
36 - 4 = ?
Subscribe to this entry?

 
 [2009-07-20 19:39 UTC] troelskn at gmail dot com
Description:
------------
magic quotes has been deprecated from 5.3
If there is no configuration setting for magic_quotes, the function get_magic_quotes_gpc will return true (int 1). This leads some scripts to believe that magic quotes is on, while they are not.

Reproduce code:
---------------
$ php --version
PHP 5.3.0 (cli) (built: Jul 19 2009 02:23:09) 
Copyright (c) 1997-2009 The PHP Group
$ php -r 'var_dump(get_magic_quotes_gpc());'
int(1)
$ php -r 'var_dump(get_magic_quotes_runtime());'
int(0)



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-07-21 10:09 UTC] troelskn at gmail dot com
Not sure what is going on here, but I've gotten my hands on another build of 5.3 and it doesn't exhibit this behaviour. In any case, I have confused the meaning of magic_quotes_runtime. I'm closing this until I can figure out why I was getting deprecated warnings on my own build of php.)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon May 27 03:01:30 2024 UTC