|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #45114 Option to change --with-config-file-scan-dir runtime
Submitted: 2008-05-28 08:37 UTC Modified: 2011-01-23 21:16 UTC
Avg. Score:5.0 ± 0.0
Reproduced:1 of 2 (50.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: jani dot ollikainen at pronetko dot fi Assigned: jani (profile)
Status: Closed Package: PHP options/info functions
PHP Version: 5.2.6 OS: Linux
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: jani dot ollikainen at pronetko dot fi
New email:
PHP Version: OS:


 [2008-05-28 08:37 UTC] jani dot ollikainen at pronetko dot fi
There should be option to change it runtime.

Possible ways are:
- Command line parameter
- php.ini directive (there's many ways to change php.ini's location)
- Enviromental variable.
Pick your poison as long as there is a way.

Reason why this is needed is:
Think about situation that's default in most distros, extension loading is done with that setting. Then you want to make a CLI
program that makes a lot of fork() and you want keep it's memory footprint to be as low as possible. You cannot with acceptable way to change cli program not loading those extensions from scan dir.

Just edit the files in scan dir? They are needed for normal WWW php operation. Just make two different php.ini's that have the extensions? And that will break distros extension loading style. Just use the -n and put all the settings in file with ini_set() and dl() functions? Uhoh, Not nice.

And there seems to be patches around the net for this problem,
but nothing in PHP itself. (my env version)

Expected result:
There should be a way to change it runtime.

Actual result:
No way to change it runtime. It can only be disabled with -n parameter but then there's no php.ini.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2008-08-12 20:04 UTC]
Quite closely related to bug #42604 which kinda requires such option/env/something to exist to be fixable.
 [2008-08-13 01:01 UTC]
This bug has been fixed in CVS.

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.

 [2008-08-13 01:03 UTC]
I added 2 ways to do this. Now you can either use both -n and -c in command line options (-n disables every ini loading, -c enables loading the specified file / from specified path) or set PHP_INI_SCAN_DIR environment variable to empty (disables scanning) or to point to some other directory.
 [2011-01-23 21:16 UTC]
-Package: Feature/Change Request +Package: PHP options/info functions
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Feb 21 19:01:29 2024 UTC