|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #49056 parse_ini_file() regression in 5.3.0 when using non-ASCII strings as option keys
Submitted: 2009-07-25 13:41 UTC Modified: 2010-12-20 12:47 UTC
From: Assigned: jani (profile)
Status: Closed Package: PHP options/info functions
PHP Version: 5.3.0 OS: Ubuntu 9.04
Private report: No CVE-ID: None
 [2009-07-25 13:41 UTC]
In PHP versions < 5.3.0, one could specify INI option keys using non-ASCII characters; parse_ini_file would find these without issue.

Starting with 5.3.0, such options are silently dropped from the returned array of key/value pairs. The same is true of parse_ini_string().

I have the following extensions enabled:
bz2 Core ctype curl date dom ereg fileinfo filter gd gettext hash iconv intl json libxml mhash mysql openssl pcntl pcre PDO pdo_mysql pdo_sqlite Phar posix Reflection session SimpleXML soap sockets SPL SQLite sqlite3 standard tidy tokenizer xml xmlreader xmlwriter zip zlib

My php.ini is php.ini-development, with the only changes being to set my include_path and date.timezone.

Reproduce code:
$string =<<<EOT
Cooking_furniture="Küchen Möbel (en)"
Küchen_Möbel="Cooking furniture (en)"

$data = parse_ini_string($string);

Expected result:
array (
  'Cooking_furniture' => 'Küchen Möbel (en)',
  'Küchen_Möbel' => 'Cooking furniture (en)',

Actual result:
array (
  'Cooking_furniture' => 'Küchen Möbel (en)',


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2009-08-04 02:34 UTC]
Automatic comment from SVN on behalf of jani
Log: - Fixed bug #49056 (parse_ini_file() regression in 5.3.0 when using non-ASCII strings as option keys)
 [2009-08-04 02:35 UTC]
This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
Thank you for the report, and for helping us make PHP better.

 [2010-12-20 12:47 UTC]
-Package: Tidy +Package: PHP options/info functions -Assigned To: +Assigned To: jani
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Mon Oct 26 22:01:23 2020 UTC