php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #47976 Unable to disable magic_quotes_gpc with ini_set function
Submitted: 2009-04-16 00:01 UTC Modified: 2009-04-16 10:52 UTC
From: surkamp at gmail dot com Assigned:
Status: Not a bug Package: PHP options/info functions
PHP Version: 5.2.9 OS: Ubuntu Linux 8.10
Private report: No CVE-ID: None
 [2009-04-16 00:01 UTC] surkamp at gmail dot com
Description:
------------
Unable to disable magic_quotes_gpc with ini_set function

PHP manual says that this variable can be changed by PHP_INI_ALL

http://www.php.net/manual/en/info.configuration.php#ini.magic-quotes-gpc

Reproduce code:
---------------
<?php

ini_set('magic_quotes_gpc', false);
echo ini_get('magic_quotes_gpc');
print $_GET['q'];

Expected result:
----------------
0
'

Actual result:
--------------
1
\'

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-04-16 10:52 UTC] jani@php.net
From sources:

main.c: STD_PHP_INI_BOOLEAN("magic_quotes_gpc",         "1",            PHP_INI_PERDIR|PHP_INI_SYSTEM,  OnUpdateBool,   magic_quotes_gpc,               php_core_globals,    core_globals)

And there's nothing in manual that says it's PHP_INI_ALL..
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed May 01 18:01:31 2024 UTC