From: noemail at example dot org
Operating system: CentOS 5
PHP version: 5.3.1
PHP Bug Type: Filesystem function related
Bug description: parse_ini_file() not parsing constants
Description:
------------
parse_ini_file() is not parsing constants that begin with an underscore.
CentOS 5 / PHP 5.3.1 from source
Note: This did work as expected in PHP 5.1.6
Reproduce code:
---------------
##### ini.ini #####
[section]
key1 = "no error"
key2buggy = __STRING
key3buggy = __STRING" stays mainly on the plain."
##### test.php #####
<?php
define('__STRING', 'The rain in Spain');
$arr = parse_ini_file('./ini.ini');
print_r($arr);
Expected result:
----------------
Array
(
[section] => Array
(
[key1] => no error
[key2buggy] => The rain in Spain
[key3buggy] => The rain in Spain stays mainly on the plain.
)
)
Actual result:
--------------
Array
(
[section] => Array
(
[key1] => no error
[key2buggy] => __STRING
[key3buggy] => __STRING stays mainly on the plain.
)
)
--
Edit bug report at http://bugs.php.net/?id=50952&edit=1
--
Try a snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=50952&r=trysnapshot52
Try a snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=50952&r=trysnapshot53
Try a snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=50952&r=trysnapshot60
Fixed in SVN:
http://bugs.php.net/fix.php?id=50952&r=fixed
Fixed in SVN and need be documented:
http://bugs.php.net/fix.php?id=50952&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=50952&r=alreadyfixed
Need backtrace:
http://bugs.php.net/fix.php?id=50952&r=needtrace
Need Reproduce Script:
http://bugs.php.net/fix.php?id=50952&r=needscript
Try newer version:
http://bugs.php.net/fix.php?id=50952&r=oldversion
Not developer issue:
http://bugs.php.net/fix.php?id=50952&r=support
Expected behavior:
http://bugs.php.net/fix.php?id=50952&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=50952&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=50952&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=50952&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=50952&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=50952&r=dst
IIS Stability:
http://bugs.php.net/fix.php?id=50952&r=isapi
Install GNU Sed:
http://bugs.php.net/fix.php?id=50952&r=gnused
Floating point limitations:
http://bugs.php.net/fix.php?id=50952&r=float
No Zend Extensions:
http://bugs.php.net/fix.php?id=50952&r=nozend
MySQL Configuration Error:
http://bugs.php.net/fix.php?id=50952&r=mysqlcfg