From:             sebastian dot schleussner at angstrom dot uu dot se
Operating system: Linux
PHP version:      5.3.0
PHP Bug Type:     Feature/Change Request
Bug description:  parse_ini_file: semicolon in section header

Description:
------------
This is a follow-up to Bug #49443.
The character breaking parse_ini_file of PHP 5.3.0 with browscap.ini is
actually the comment character ";" inside section headers - not one of the
special characters.


Reproduce code:
---------------
;sample1.ini
; demonstration of what works in 5.2 and 5.3
[a(b){c}&~![^]
x=y

;sample2.ini
; demonstration of the problem
[a;b];c
x=y

Code:
-----
<?php
print_r(parse_ini_file('sample1.ini', true));
print_r(parse_ini_file('sample2.ini', true));
?>

Expected result:
----------------
As in PHP 5.2.10 -- the header's square brackets being interpreted as
quoting:
Array
(
    [a(b){c}&~![^] => Array
        (
            [x] => y
        )

)
Array
(
    [a;b] => Array
        (
            [x] => y
        )

)

Actual result:
--------------
Array
(
    [a(b){c}&~![^] => Array
        (
            [x] => y
        )

)
PHP Warning:  syntax error, unexpected $end, expecting ']' in sample2.ini
on line 1

-- 
Edit bug report at http://bugs.php.net/?id=49461&edit=1
-- 
Try a snapshot (PHP 5.2):            
http://bugs.php.net/fix.php?id=49461&r=trysnapshot52
Try a snapshot (PHP 5.3):            
http://bugs.php.net/fix.php?id=49461&r=trysnapshot53
Try a snapshot (PHP 6.0):            
http://bugs.php.net/fix.php?id=49461&r=trysnapshot60
Fixed in SVN:                        
http://bugs.php.net/fix.php?id=49461&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=49461&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=49461&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=49461&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=49461&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=49461&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=49461&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=49461&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=49461&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=49461&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=49461&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=49461&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=49461&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=49461&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=49461&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=49461&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=49461&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=49461&r=mysqlcfg

Reply via email to