From:             rickwalker2001 at gmail dot com
Operating system: OS X 10.6
PHP version:      5.3.0
PHP Bug Type:     Filesystem function related
Bug description:  parse_ini_file() throws errors when key contains '/' (forward 
slash)

Description:
------------
When parsing ini files if the key contains a '/' char a syntax error is 
thrown.

I have seen a bug closed as bogus from back in feb on one of the 5.3 
beta versions but I am seeing this with the latest stable 5.3 build from 
macports.

PHP 5.3.0 (cli) (built: Sep 26 2009 00:08:23) 
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2009 Zend Technologies
    with Xdebug v2.0.5, Copyright (c) 2002-2008, by Derick Rethans


Reproduce code:
---------------
//my.ini file
[sitemap]
/home    = default:index
/info    = default:info

print_r(parse_ini_file('my.ini', true));

Expected result:
----------------
Array
(

    [sitemap] => Array
        (
            [/home] => default:index
            [/info] => default:info
        )

)

Actual result:
--------------
PHP Warning:  syntax error, unexpected '/' in my.ini on line 2
 in /Users/rick/test.php on line 5
PHP Stack trace:
PHP   1. {main}() /Users/rick/test.php:0
PHP   2. parse_ini_file() /Users/rick/test.php:5

Warning: syntax error, unexpected '/' in my.ini on line 2
 in /Users/rick/test.php on line 5

Call Stack:
    0.0004     622136   1. {main}() /Users/rick/test.php:0
    0.0004     622312   2. parse_ini_file() /Users/rick/test.php:5


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

Reply via email to