From: kristo at waher dot net Operating system: Windows 7 PHP version: 5.5.3 Package: Strings related Bug Type: Bug Bug description:parse_ini_file() and INI_SCANNER_RAW breaks with newlines
Description: ------------ parse_ini_file() works correctly if INI_SCANNER_RAW is not used. However once it is used then newlines throw errors in code and make it impossible to store any newline-including strings in INI files. It's said that if you want to use newlines in your INI, you must enclose in double-quotes. This is true, but not if you use INI_SCANNER_RAW option. Since the alternative of not using INI_SCANNER_RAW is not an option (due to how it converts some strings and values), this is a bug and should be fixed. Test script: --------------- INI: name="thomas moore"; SCRIPT: parse_ini_file('test.ini',false,INI_SCANNER_RAW); Expected result: ---------------- no error Actual result: -------------- Warning: syntax error, unexpected '"' in test.ini on line 2 in \test.php on line 1 -- Edit bug report at https://bugs.php.net/bug.php?id=65568&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=65568&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=65568&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=65568&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=65568&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=65568&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=65568&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=65568&r=needscript Try newer version: https://bugs.php.net/fix.php?id=65568&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=65568&r=support Expected behavior: https://bugs.php.net/fix.php?id=65568&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=65568&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=65568&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=65568&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=65568&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=65568&r=dst IIS Stability: https://bugs.php.net/fix.php?id=65568&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=65568&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=65568&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=65568&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=65568&r=mysqlcfg