|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #77256 PHP Version => 5.6.30-0+deb8u1
Submitted: 2018-12-06 20:14 UTC Modified: 2018-12-12 11:04 UTC
From: kzg dot xc dot hu at gmail dot com Assigned:
Status: Not a bug Package: *Directory/Filesystem functions
PHP Version: 5.6.30 OS: Debian Jessie
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
41 + 22 = ?
Subscribe to this entry?

 [2018-12-06 20:14 UTC] kzg dot xc dot hu at gmail dot com
From manual page:

PHP Version => 5.6.30-0+deb8u1

Test script:
no = "norvegian"
$fp = fopen($fName, 'w');
fwrite($fp, $file_content);

$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

// output: bool(false)
// echo file_get_contents( $fName ); works fine


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2018-12-06 20:28 UTC]
-Status: Open +Status: Not a bug
 [2018-12-06 20:28 UTC]
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at and the instructions on how to report
a bug at

> 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-07 05:01 UTC] kzg dot xc dot hu at gmail dot com
-PHP Version: 5.6.39 +PHP Version: 5.6.30
 [2018-12-07 05:01 UTC] 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-07 05:33 UTC]
As a workaround, put a space at the beginning of the line. Not sure it should work, but it does.

 no = "norvegian"
 [2018-12-11 20:14 UTC] a at b dot c dot de
If you've got control over the codes used, ISO639-2 provides three-letter codes for languages; neither "yes" nor "off" conflict with this list.
 [2018-12-12 10:56 UTC] kzg dot xc dot hu at gmail dot com
Thx a at b dot c dot de, of course I have control over the code, since I am writing that. It is some kind of parameter check of the online Google translator, and sadly, they use "no" as an identifier for "Norvegian". The simpliest way is: $chkarray["no"]="Norvegian". As a php source code, it is accepted, and works error-free. Some sniffing around docs, makes clear, that nowadays there is no official put_ini_file, or similar function, therefore all of us have the ability writing a proprietary code.It can be either file_put_contents, or write it line-by line, etc, or just write 1 line to the end of the strem, as I did. Writing a space to the beginning of each line is simple and effective.
 [2018-12-12 11:04 UTC] kzg dot xc dot hu at gmail dot com
To requinix: thxs, it works, and I do apologize forgetting earlier to send that reply to you.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon May 27 02:01:30 2024 UTC