From: wendland at scan-plus dot de
Operating system:
PHP version: 4.3.7
PHP Bug Type: Scripting Engine problem
Bug description: lex pattern for ini-file sections wrong (affects
php.ini/parse_ini_file())
Description:
------------
The pattern for section in ini-files (as used in php.ini and each file
used with parse_ini_file()) is wrong. It looks like (in
Zend/zend_ini_scanner.l:140):
<INITIAL>[[][^[]+[\]][ ]*{NEWLINE}?
That means that the following example won't work:
[section]
var = "val"
var2 = "]"
var3 = "val3"
Try to run this through parse_ini_file(). The pattern should look like:
<INITIAL>\[[^\]]+\][ ]*{NEWLINE}?
If you'd like to disallow brackets in section name, you could use the
following pattern:
<INITIAL>\[[^\]\[]+\][ ]*{NEWLINE}?
Kind Regards,
Joerg Wendland
--
Edit bug report at http://bugs.php.net/?id=28804&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=28804&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=28804&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=28804&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=28804&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=28804&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=28804&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=28804&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=28804&r=support
Expected behavior: http://bugs.php.net/fix.php?id=28804&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=28804&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=28804&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=28804&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=28804&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=28804&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=28804&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=28804&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=28804&r=float