From: Operating system: Linux PHP version: Irrelevant Package: PHP options/info functions Bug Type: Feature/Change Request Bug description:multiple php.ini with mod_php5 allusive or impossible
Description: ------------ Greetings, I have noticed that under apache, setting php.ini-only directives (such as disable_functions - which is not accepted in httpd.conf) per virtual host can only be done by installing php with something like suPHP. This is not a desirable configuration in most cases when php is already installed as mod_php4 or mod_php5. Furthermore, for loading php.ini files, PHPRC environment variable seems to be ignored, as well, PHPINIDir only is accepted once per apache configuration, even in completely different vhost blocks. I run a shared hosting infastructure for special project sites, Now, I would like to have a default, restricted PHP configuration, then under certain virtual host blocks (for example, for users I approve) set up "less restricted" php.ini files for those accounts. Also, there are several internally run sites that need a very loose setup but I would not want regular users having that setup for themselves. The issue at the moment is for many options, PHP does not accept more than one setup per server (oncemore, in the case of disable_functions). Test script: --------------- <? system('ls'); ?> Expected result: ---------------- On one "restricted" vhost with options set via php.ini: The script should return that the system() function is disabled. On a "less restricted" vhost with options set via php.ini: The script should execute the system() call. Actual result: -------------- Either: On one "restricted" vhost with options set via php.ini: The script returns that the system() function is disabled. On a "less restricted" vhost with options set via php.ini: The script returns that the system() function is disabled. Or: On one "restricted" vhost with options set via php.ini: The script executes the system() call. On a "less restricted" vhost with options set via php.ini: The script executes the system() call. -- Edit bug report at http://bugs.php.net/bug.php?id=52325&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=52325&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=52325&r=trysnapshot53 Try a snapshot (trunk): http://bugs.php.net/fix.php?id=52325&r=trysnapshottrunk Fixed in SVN: http://bugs.php.net/fix.php?id=52325&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=52325&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=52325&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=52325&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=52325&r=needscript Try newer version: http://bugs.php.net/fix.php?id=52325&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=52325&r=support Expected behavior: http://bugs.php.net/fix.php?id=52325&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=52325&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=52325&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=52325&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=52325&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=52325&r=dst IIS Stability: http://bugs.php.net/fix.php?id=52325&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=52325&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=52325&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=52325&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=52325&r=mysqlcfg