Bug #67093 [NEW]: parse_ini_file can't handle space before "["

From: Date: Thu, 17 Apr 2014 08:59:33 +0000
Subject: Bug #67093 [NEW]: parse_ini_file can't handle space before "["
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-185318@lists.php.net to get a copy of this message
From: swan886 at gmail dot com Operating system: Linux PHP version: 5.5.11 Package: *Regular Expressions Bug Type: Bug Bug description:parse_ini_file can't handle space before "[" Description: ------------ If the ini file contains space before [, the parse_ini_file will not get correct result. For ex, change [section] param = value to [section] param=value result will be wrong. Test script: --------------- The simplest test way is to change php.ini's first [PHP] to [PHP] I use a simple solution to fix this. modify Zend/zend_ini_scanner.l line 359 <INITIAL>"[" { => <INITIAL>{TABS_AND_SPACES}*"[" { but this is for 5.5.3 -- Edit bug report at https://bugs.php.net/bug.php?id=67093&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=67093&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=67093&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=67093&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=67093&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=67093&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=67093&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=67093&r=needscript Try newer version: https://bugs.php.net/fix.php?id=67093&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=67093&r=support Expected behavior: https://bugs.php.net/fix.php?id=67093&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=67093&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=67093&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=67093&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=67093&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=67093&r=dst IIS Stability: https://bugs.php.net/fix.php?id=67093&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=67093&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=67093&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=67093&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=67093&r=mysqlcfg

« previous php.bugs (#185318) next »