|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #34274 parse_ini_file does not recognize ${key}
Submitted: 2005-08-26 22:23 UTC Modified: 2016-12-30 23:01 UTC
Avg. Score:3.5 ± 0.9
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:1 (50.0%)
From: php dot net at sharpdreams dot com Assigned:
Status: Open Package: Filesystem function related
PHP Version: 5CVS-2005-08-26 (snap) OS: Win32/Apache2
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: php dot net at sharpdreams dot com
New email:
PHP Version: OS:


 [2005-08-26 22:23 UTC] php dot net at sharpdreams dot com
On the documentaiton page of php.ini, it states:

" Since PHP 5.1.0, it is possible to refer to existing .ini variables from within .ini files. Example: open_basedir = ${open_basedir} ":/new/dir"."

This does not seem to work in 5.1 for parse_ini_file.

Also, it appears there is no way to reference sections, e.g.,

baz = ${}

That would be nice. Very nice, in fact (regardless of syntax required).

Reproduce code:
--- file.ini ---
foo = bar
baz = ${foo}

--- test.php ---

$ini = parse_ini_file( "file.ini", true );

var_dump( $ini );


Expected result:
array(1) {
  array(2) {
    string(3) "bar"
    string(3) "bar"

Actual result:
array(1) {
  array(2) {
    string(3) "bar"
    string(0) ""


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-08-28 01:12 UTC]
This is not really bug but feature request. (nobody said it works with parse_ini_file(), did they?)

 [2005-08-28 18:27 UTC] php dot net at sharpdreams dot com
Er, true. However, read your comments on bug #33574. :-) It was also my understanding that they used the same parsing code, but this understanding may be flawed.
 [2016-12-30 23:01 UTC]
-Package: Feature/Change Request +Package: Filesystem function related
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Thu Sep 29 14:05:55 2022 UTC