php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #35684 PHPIniDir can't be specified twice for different virtual hosts
Submitted: 2005-12-15 16:20 UTC Modified: 2005-12-15 16:29 UTC
From: techtonik@php.net Assigned:
Status: Not a bug Package: Apache2 related
PHP Version: 5.1.1 OS: W2K
Private report: No CVE-ID: None
 [2005-12-15 16:20 UTC] techtonik@php.net
Description:
------------
I'd like to specify distinct php.ini for two VirtualHosts. The problem is what PHPIniDir cannot be specified multiple times in httpd.conf

Is it possible to correct PHPIniDir behavior? If not - then why? I think other hosting companies are interested in solution too. 

Additionally I'd like to specify exact php.ini file in this (or perhaps PHPIniPath) directive. Useful when you have multiple users and would like to keep their php.inis in one place.


Reproduce code:
---------------
E:\WebServices\Apache2\bin>Apache.exe


Actual result:
--------------
Syntax error on line 977 of E:/WebServices/Apache2/conf/httpd.conf:
Only first PHPINIDir directive honored per configuration tree - subsequent ones ignored


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-12-15 16:29 UTC] tony2001@php.net
Apparently it is impossible just because an apache child may serve requests to different virtual hosts, but it loads PHP module (and reads php.ini) only once - during the initial startup.
Please ask such questions in internals.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Jul 08 07:01:29 2024 UTC