php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #44936 BC break: ini_set() changes 'access' value
Submitted: 2008-05-07 18:11 UTC Modified: 2008-10-26 01:00 UTC
Votes:15
Avg. Score:4.1 ± 1.0
Reproduced:11 of 11 (100.0%)
Same Version:9 (81.8%)
Same OS:4 (36.4%)
From: romain dot dorgueil at sensio dot net Assigned: iliaa (profile)
Status: No Feedback Package: *General Issues
PHP Version: 5.2CVS only OS: linux 2.6.22-14
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: romain dot dorgueil at sensio dot net
New email:
PHP Version: OS:

 

 [2008-05-07 18:11 UTC] romain dot dorgueil at sensio dot net
Description:
------------
ini_set changes the 'access' parameter of configuration entry to 63 without any reason.

This behaviour did not exist in previous versions and is very easy to reproduce. It is not documented and not in the php 5.6.3 changelog.

Reproduce code:
---------------
<?php
define('CONFIG_ENTRY', 'magic_quotes_runtime');

function dumpini()
{
  $configs = ini_get_all();
  echo 'access value: '.$configs[CONFIG_ENTRY]['access']."\n";
}

dumpini();

echo 'ini_set(\''.CONFIG_ENTRY.'\', 0);'."\n";
ini_set(CONFIG_ENTRY, 0);

dumpini();


Expected result:
----------------
access value: 7
ini_set('magic_quotes_runtime', 0);
access value: 7


Actual result:
--------------
access value: 7
ini_set('magic_quotes_runtime', 0);
access value: 63


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-05-26 20:31 UTC] jani@php.net
Ilia, I think this is the patch that causes the side-effect:

http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_ini.c?r1=1.39.2.2.2.26&r2=1.39.2.2.2.27&pathrev=PHP_5_2
 [2008-09-08 20:06 UTC] stas@php.net
Why it is a problem? As far as I can see, there was a change that now uses some previously unused bits in the access mask, but why it is a bug? Does something that worked before doesn't work now? 
 [2008-10-26 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2012-01-11 13:18 UTC] info at ria-developer dot eu
I also have the same problem in PHP 5.2.17 version. Does anyone know what means 
"63" in key "access" after call ini_get_all()? Thanks for help in advance.
According to documentation 
(http://www.php.net/manual/en/configuration.changes.modes.php) there sholuld be 
1,6,4 or 7.
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Wed Jul 06 01:05:44 2022 UTC