Bug #54974 [NEW]: parse_ini_file() does not handle parens in property values
| From: | dhendric at adobe dot com | Date: | Thu, 02 Jun 2011 02:13:29 +0000 |
| Subject: | Bug #54974 [NEW]: parse_ini_file() does not handle parens in property values | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-161119@lists.php.net to get a copy of this message | ||
From:
Operating system: RHEL 5
PHP version: 5.2.17
Package: Unknown/Other Function
Bug Type: Bug
Bug description:parse_ini_file() does not handle parens in property values
Description:
------------
---
From manual page: http://www.php.net/function.parse-ini-file#Description
---
Using parse_ini_file() on a ini files that contain parens () in the
property values throws and error.
Example of Test.ini file:
#S7Z OK
#Wed Jun 01 18:58:52 PDT 2011
copyright=Copyright (c) 2001-2010 Adobe Systems Incorporated. All rights
reserved.
imageServer.buildDate=Mon Apr 25 02:18:36 PDT 2011
imageServer.startTime=Mon Apr 25 16:10:52 PDT 2011
imageServer.version=4.9.2
Test script:
---------------
print_r(parse_ini_file("Test.ini"));
Expected result:
----------------
The parse_ini_file() should process any character in the property value
else what good is it.
Actual result:
--------------
Warning: syntax error, unexpected '(' in Test.ini on line 3 in
/opt/lampp/htdocs/working_deirdra/serverlist/serverlist_ajax.php on line 82
--
Edit bug report at http://bugs.php.net/bug.php?id=54974&edit=1
--
Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=54974&r=trysnapshot52
Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=54974&r=trysnapshot53
Try a snapshot (trunk): http://bugs.php.net/fix.php?id=54974&r=trysnapshottrunk
Fixed in SVN: http://bugs.php.net/fix.php?id=54974&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=54974&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=54974&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=54974&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=54974&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=54974&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=54974&r=support
Expected behavior: http://bugs.php.net/fix.php?id=54974&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=54974&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=54974&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=54974&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=54974&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=54974&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=54974&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=54974&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=54974&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=54974&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=54974&r=mysqlcfg