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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: surkamp at gmail dot com
New email:
PHP Version: OS:

 

 [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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Sun Jun 08 05:01:26 2025 UTC