ID: 45114 Updated by: [EMAIL PROTECTED] Reported By: jani dot ollikainen at pronetko dot fi Status: Closed Bug Type: Feature/Change Request Operating System: Linux PHP Version: 5.2.6 Assigned To: jani New Comment:
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. Previous Comments: ------------------------------------------------------------------------ [2008-08-13 01:01:41] [EMAIL PROTECTED] 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 http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. ------------------------------------------------------------------------ [2008-08-12 20:04:33] [EMAIL PROTECTED] Quite closely related to bug #42604 which kinda requires such option/env/something to exist to be fixable. ------------------------------------------------------------------------ [2008-05-28 08:37:39] jani dot ollikainen at pronetko dot fi Description: ------------ 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. http://alt.linux.kiev.ua/srpm/php/patches/20 http://www.opendogs.org/pub/php-5_2_3-config-file-scan-dir.patch http://pronetko.fi/~bestis/php-5.1.6-scandir.patch (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. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=45114&edit=1