note 96865 added to configuration

From: Date: Fri, 19 Mar 2010 20:06:33 +0000
Subject: note 96865 added to configuration
Groups: php.notes 
Request: Send a blank email to php-notes+get-167234@lists.php.net to get a copy of this message
As of PHP 5.3.x (the only versions I have tested this with) on Linux and Apache 2.2 using module, this is what you need to do in order to completely isolate the PHP configuration. For OS Environment in which Apache is started: PHP_INI_SCAN_DIR=/path/to/dir/with/additional_ini_files export PHP_INI_SCAN_DIR For the Apache Module Config (i.e. httpd.conf): ## The path to the dir that contains php.ini (not the path to the file) PHPINIDir /path/to/dir/with/php_ini_file LoadModule php5_module /path/to/php5module.so <FilesMatch "\.php$"> SetHandler application/x-httpd-php </FilesMatch> PHPINIDir (note not PHPIniDir as has been previously reported) tells the module what dir to look for php.ini. You can confirm this by looking at the output of phpinfo() for the "Configuration File (php.ini) Path". The PHP_INI_SCAN_DIR OS env setting specifies where the other PHP ini files should be loadeded from. This ONLY works if set before Apache is started. You can confirm with the "Scan this dir for additional .ini files" item in the phpinfo() output. Setting these two settings will allow you to have your PHP config completely isolated to the apache instance, and thus multiple instances of apache on the same host can have completely different PHP configs. ---- Server IP: 69.147.83.197 Probable Submitter: 209.251.192.6 ---- Manual Page -- http://www.php.net/manual/en/configuration.php Edit -- https://master.php.net/note/edit/96865 Del: integrated -- https://master.php.net/note/delete/96865/integrated Del: useless -- https://master.php.net/note/delete/96865/useless Del: bad code -- https://master.php.net/note/delete/96865/bad+code Del: spam -- https://master.php.net/note/delete/96865/spam Del: non-english -- https://master.php.net/note/delete/96865/non-english Del: in docs -- https://master.php.net/note/delete/96865/in+docs Del: other reasons-- https://master.php.net/note/delete/96865 Reject -- https://master.php.net/note/reject/96865 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#167234) next »