|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #67093 parse_ini_file can't handle space before "["
Submitted: 2014-04-17 08:59 UTC Modified: 2014-04-17 17:02 UTC
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: swan886 at gmail dot com Assigned:
Status: Not a bug Package: *Regular Expressions
PHP Version: 5.5.11 OS: Linux
Private report: No CVE-ID: None
 [2014-04-17 08:59 UTC] swan886 at gmail dot com
If the ini file contains space before [, the parse_ini_file will not get correct result. For ex,

  param = value



result will be wrong.

Test script:
The simplest test way is to change php.ini's first




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


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2014-04-17 17:02 UTC]
-Status: Open +Status: Not a bug
 [2014-04-17 17:02 UTC]
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 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.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Jul 14 15:01:28 2024 UTC