From:             sander at procurios dot nl
Operating system: Mac OS X
PHP version:      5.3CVS-2008-04-02 (snap)
PHP Bug Type:     Filesystem function related
Bug description:  parse_ini_file 'dollar'-sign problems

Description:
------------
Parse_ini_file gives a syntax error on 'dollar'-sign in INI-file.

Source: php5.3-200804021030.tar.gz (Built on: Apr 02, 2008 10:30 UTC)

Reproduce code:
---------------
<?php
// Set ini file location
$iniFileLocation = dirname(__FILE__) . '/test.ini';

// Build ini data
$iniData = '[database]
db_user = username
db_pass = "[EMAIL PROTECTED]"
db_name = database
db_host = localhost';

// Save ini data to file
file_put_contents($iniFileLocation, $iniData);

print_r(parse_ini_file($iniFileLocation));

Expected result:
----------------
Array
(
    [db_user] => username
    [db_pass] => [EMAIL PROTECTED]
    [db_name] => database
    [db_host] => localhost
)

Actual result:
--------------
Warning: syntax error, unexpected $end, expecting TC_DOLLAR_CURLY or
TC_QUOTED_STRING or '"' in /data/www/test.ini on line 3 in
/data/www/test.php on line 15
Array
(
    [db_user] => username
)

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

Reply via email to