php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #28448 php.ini location change to enable multiple versions of PHP
Submitted: 2004-05-19 20:57 UTC Modified: 2005-04-26 17:26 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: gidmanma at hotmail dot com Assigned:
Status: Not a bug Package: Documentation problem
PHP Version: Irrelevant OS: Windows Server 2003
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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: gidmanma at hotmail dot com
New email:
PHP Version: OS:

 

 [2004-05-19 20:57 UTC] gidmanma at hotmail dot com
Description:
------------
IIS 6.0 on Windows Server 2003 allows seperate MIME mappings for each web site on the server.  Using site specific MIME mappings I am running both PHP 4.3.6 and PHP 5.0.0 RC2 (both in ISAPI) at the same time on the same server.  The only problem is that there is no way to specify a seperate php.ini for each version of PHP installed.

Can something be changed in PHP that either causes it to look for the ini in the same folder/directory as the dll?  Or, is there another way around this problem?

TIA


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-05-19 22:12 UTC] wez@php.net
You can easily acheive it this way:

install PHP 4 to C:\php4
put your PHP 4 specific php.ini file into C:\php4
rearrange the contents of that folder so that all the .dll files from the dlls and extensions folders live in C:\php4.
Make sure your extensions_dir=c:\php4 in your c:\php4\php.ini
[this creates a self-contained PHP 4 distro]

install PHP 5 to C:\php5
put your PHP 5 specific php.ini into C:\php5\php.ini
move all the extension .dlls into C:\php5
[this creates a self-contained PHP 5 distro]

Make sure that NEITHER C:\php4 nor C:\php5 are listed in your PATH.
Remove all PHP related DLLs from your windows system directly.
Remove the global php.ini from C:\windows\php.ini
[this removes global stuff that might confuse things]

Making this a docu problem, since we should have it mentioned somewhere.
 [2005-04-05 22:54 UTC] peter dot ordal at rochester dot edu
I'm not seeing this behavior. I followed the instructions exactly but php never seems to check its directory for php.ini. I watched where it was looking with FileMon (systeminternals.com) and it looked in the web server folder, and c:\windows, but not its own folder (both 4 and 5). When PHP didn't find php.ini in either of those locations, it just reverted to using default values.
 [2005-04-26 17:26 UTC] vrana@php.net
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.

Dup of bug #21244.

Order of directories for searching php.ini is described in the docs. One of them is "Directory of PHP (for CLI), or the web server's directory (for SAPI modules)". So it seems it's impossible to setup different php.ini for two SAPI modules. If you don't like it, create Feature Request for it.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 00:01:41 2024 UTC