php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #21158 -c path/to/php.ini not available is iis5
Submitted: 2002-12-22 23:15 UTC Modified: 2003-05-19 02:07 UTC
From: petar at escape dot net dot au Assigned:
Status: Closed Package: IIS related
PHP Version: 4.2.3 OS: windows 2000 sp3
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: petar at escape dot net dot au
New email:
PHP Version: OS:

 

 [2002-12-22 23:15 UTC] petar at escape dot net dot au
The '-c path/to/php.ini' command line option can not be passed to IIS in the php script mapping and as a result seperate php.ini files can not be used to isolate different virtual sites in iis5. Anyone know how to pass this variable to iis to make this work. It is not documented anywhere after extensive search.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-12-23 02:47 UTC] cg at gordimer dot net
There is a news entry for PHP 4.0 RC1:

Modified the registry INI entry reader (Win32) to work with drive letters. For example, if you wish to wish to specify INI entries for C:\foo\bar, you should create HKLM\PHP\Per Directory Values\C\foo\bar in the registry, and add string values for each directive you want to override in this directory (Zeev)

I didn't find any more documentation. This should be marked as documentation bug.
 [2002-12-26 20:25 UTC] edink@php.net
Are you sure you're just passing a directory name? Like -c "c:\myinifiles\site7" which does not include "php.ini" itself?

In 4.3.0 you can pass the filename as well as the dir name, but that didn't work in previous versions.
 [2002-12-26 21:35 UTC] petar at escape dot net dot au
Can't get it working with 4.2.3 or 4.3.0 and I have tried using c:\php\php.exe -c "d:\phpsite1" and also with specifying the php.ini file directly in "c:\php\php.exe -c "d:\phpsite1\php.ini" which also does not work. I have been checking the php.ini variables with phpinfo after each change and seeing no difference. It keeps coming back with the php.ini file is c:\winnt\php.ini and checking variables like SMTP which is different in both files shows the new php.ini is not being used.

In regards the other post about the news article - this does not apply as php.ini can specify all config variables and the 'registry per directory' method is very limited as to changes that can be made.

..petar
 [2003-01-08 05:57 UTC] petar at escape dot net dot au
The only way around this problem is to run multiple copies of php ( >= 4.3.0) and keep the php.ini in the same directory as the php binary. This way the correct php.ini is loaded for the correct instance. 

Now it is possible to give each IIS Virtual server their 'own' copy of php and keep them in their own sandpits.

Not really the solution I was looking for but can live with it.
 [2003-05-19 02:07 UTC] shane@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

-c has been purposly unavailable to PHP being executed under a web server.  Use registry entries or seperate installations to provide unique configurations.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu May 02 06:01:32 2024 UTC