php.net |  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) {
        ini_set('magic_quotes_gpc','off');
    }

    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.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-02-26 21:29 UTC] yohgaki@php.net
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
from http://www.php.net/downloads.php

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-2024 The PHP Group
All rights reserved.
Last updated: Sun Oct 06 19:01:27 2024 UTC