Bug #77256 [Nab]: PHP Version => 5.6.30-0+deb8u1

From: Date: Fri, 07 Dec 2018 05:33:41 +0000
Subject: Bug #77256 [Nab]: PHP Version => 5.6.30-0+deb8u1
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-218305@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=77256&edit=1 ID: 77256 Updated by: requinix@php.net Reported by: kzg dot xc dot hu at gmail dot com Summary: PHP Version => 5.6.30-0+deb8u1 Status: Not a bug Type: Bug Package: *Directory/Filesystem functions Operating System: Debian Jessie PHP Version: 5.6.30 Block user comment: N Private report: N New Comment: As a workaround, put a space at the beginning of the line. Not sure it should work, but it does. $file_content=<<<thisone no = "norvegian" thisone; Previous Comments: ------------------------------------------------------------------------ [2018-12-07 05:01:58] kzg dot xc dot hu at gmail dot com I see, that there are some limitations in keys, but this one is very uncomfortable, since "no" is the official ISO 3166-1 alpha-2 code of Norway. ------------------------------------------------------------------------ [2018-12-06 20:28:43] requinix@php.net Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php > Note: There are reserved words which must not be used as keys for ini files. > These include: null, yes, no, true, false, on, off, none. ------------------------------------------------------------------------ [2018-12-06 20:14:37] kzg dot xc dot hu at gmail dot com Description: ------------ --- From manual page: https://php.net/function.parse-ini-file --- PHP Version => 5.6.30-0+deb8u1 Test script: --------------- $file_content=<<<thisone no = "norvegian" thisone; $fName='/var/tmp/norvegian.txt'; $fp = fopen($fName, 'w'); fwrite($fp, $file_content); fclose($fp); $TOarrayORnotTOarray= parse_ini_file ($fName); // PHP Warning: syntax error, unexpected BOOL_FALSE in /var/tmp/norvegian.txt on line 1 in php shell code on line 1 var_dump($TOarrayORnotTOarray); // output: bool(false) // echo file_get_contents( $fName ); works fine ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=77256&edit=1

« previous php.bugs (#218305) next »