|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #8584 ini_set creating untrue local values
Submitted: 2001-01-07 23:47 UTC Modified: 2002-02-26 21:29 UTC
From: philip at theprojects dot org Assigned:
Status: Not a bug Package: PHP options/info functions
PHP Version: 4.0.4 OS: multiple
Private report: No CVE-ID: None
 [2001-01-07 23:47 UTC] philip at theprojects dot org
When using ini_set() on a non-configurable setting, it'll return a "non-existent" local value.  For example, I run this while magic_quotes_gpc are globally on :

    if (get_magic_quotes_gpc() == TRUE) {

    if (get_magic_quotes_gpc() == FALSE) {
        print 'magic_quotes are off';
    } else {
        print 'magic_quotes are still on silly';

It will print 'magic_quotes are off' when really they are not.  Admittedly this aspect is 'out of my field' but after a php-general list posting I am told :

"Directives that affect actions that are taken before a script is parsed, such as mangling EGPCS data, can not be changed by the script."  -- Rasmus

Which makes sense but it seems the attempt above should not "partially work."  phpinfo says :

    magic_quotes_gpc : localvalue = off , mastervalue = on

When I assume there is no such thing as a local value for these type of directives, right?  Something is up.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-02-26 21:29 UTC]
The version of PHP that this bug was reported in is too old. Please
try to reproduce this bug in the latest version of PHP (available

If you are still able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".

PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Sat Mar 25 16:03:41 2023 UTC