Bug #67093 [Opn->Nab]: parse_ini_file can't handle space before "["
Edit report at https://bugs.php.net/bug.php?id=67093&edit=1
ID: 67093
Updated by: ab@php.net
Reported by: swan886 at gmail dot com
Summary: parse_ini_file can't handle space before "["
-Status: Open
+Status: Not a bug
Type: Bug
Package: *Regular Expressions
Operating System: Linux
PHP Version: 5.5.11
Block user comment: N
Private report: N
New Comment:
Sorry, but your problem does not imply a bug in PHP itself. For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system
is not the
appropriate forum for asking support questions. Due to the volume
of reports we can not explain in detail here why your report is not
a bug. The support channels will be able to provide an explanation
for you.
Thank you for your interest in PHP.
Why should this be an issue? Actually that is a usual format also documented in desktop entry spec.
Implementations may vary, PHP's one is fine with that spec.
Previous Comments:
------------------------------------------------------------------------
[2014-04-17 08:59:32] swan886 at gmail dot com
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 this bug report at https://bugs.php.net/bug.php?id=67093&edit=1
Thread (2 messages)