From:
Operating system: Windows XP SP3
PHP version: 5.3.8
Package: Dynamic loading
Bug Type: Bug
Bug description:php.ini directives will lock once they are used in a host
specific section
Description:
------------
PHP version: 5.3.8-ZS5.5.0
ini_set function returns false if the given directive is named in a host
specific
section. As the result, the directive's value is not changed. This bug is
reproducible with other similar functions like set_include_path.
Don't forget to restart your webserver before testing since this bug
requires
modifying php.ini file.
Test script:
---------------
Insert the following section into your php.ini file:<br />
<br />
[Zend]<br />
include_path=".;C:\Program
Files\Zend\ZendServer\share\ZendFramework\library"<br />
<br />
[HOST=anything.com]<br />
include_path=".;C:\my_library"<br />
<br />
<?php
echo "Executing: ini_set('include_path', 'C:\another_library')<br />\n";
$result = ini_set('include_path', 'C:\another_library');
echo 'ini_set returned: ' . ($result ? 'true' : 'false');
echo "<br />\n";
echo 'And current value for directive is: ' . ini_get('include_path');
Expected result:
----------------
Insert the following section into your php.ini file:<br />
<br />
[Zend]<br />
include_path=".;C:\Program
Files\Zend\ZendServer\share\ZendFramework\library"<br
/>
<br />
[HOST=anything.com]<br />
include_path=".;C:\my_library"<br />
<br />
Executing: ini_set('include_path', 'C:\another_library')<br />
ini_set returned: true<br />
And current value for directive is: .;C:\another_library
Actual result:
--------------
Insert the following section into your php.ini file:<br />
<br />
[Zend]<br />
include_path=".;C:\Program
Files\Zend\ZendServer\share\ZendFramework\library"<br
/>
<br />
[HOST=anything.com]<br />
include_path=".;C:\my_library"<br />
<br />
Executing: ini_set('include_path', 'C:\another_library')<br />
ini_set returned: false<br />
And current value for directive is: .;C:\my_library
--
Edit bug report at https://bugs.php.net/bug.php?id=55706&edit=1
--
Try a snapshot (PHP 5.4):
https://bugs.php.net/fix.php?id=55706&r=trysnapshot54
Try a snapshot (PHP 5.3):
https://bugs.php.net/fix.php?id=55706&r=trysnapshot53
Try a snapshot (trunk):
https://bugs.php.net/fix.php?id=55706&r=trysnapshottrunk
Fixed in SVN:
https://bugs.php.net/fix.php?id=55706&r=fixed
Fixed in SVN and need be documented:
https://bugs.php.net/fix.php?id=55706&r=needdocs
Fixed in release:
https://bugs.php.net/fix.php?id=55706&r=alreadyfixed
Need backtrace:
https://bugs.php.net/fix.php?id=55706&r=needtrace
Need Reproduce Script:
https://bugs.php.net/fix.php?id=55706&r=needscript
Try newer version:
https://bugs.php.net/fix.php?id=55706&r=oldversion
Not developer issue:
https://bugs.php.net/fix.php?id=55706&r=support
Expected behavior:
https://bugs.php.net/fix.php?id=55706&r=notwrong
Not enough info:
https://bugs.php.net/fix.php?id=55706&r=notenoughinfo
Submitted twice:
https://bugs.php.net/fix.php?id=55706&r=submittedtwice
register_globals:
https://bugs.php.net/fix.php?id=55706&r=globals
PHP 4 support discontinued:
https://bugs.php.net/fix.php?id=55706&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=55706&r=dst
IIS Stability:
https://bugs.php.net/fix.php?id=55706&r=isapi
Install GNU Sed:
https://bugs.php.net/fix.php?id=55706&r=gnused
Floating point limitations:
https://bugs.php.net/fix.php?id=55706&r=float
No Zend Extensions:
https://bugs.php.net/fix.php?id=55706&r=nozend
MySQL Configuration Error:
https://bugs.php.net/fix.php?id=55706&r=mysqlcfg