IIS & PHP Setup question-How to host multiple websites

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
homeshow
Forum Newbie
Posts: 4
Joined: Thu Nov 24, 2005 1:39 pm
Location: Denver, Colorado, USA

IIS & PHP Setup question-How to host multiple websites

Post by homeshow »

My server setup: Win2k, IIS5.0, PHP running as ISAPI.
Virtual servers (websites) each set up with individual IP addresses.
In IIS, each site is individually set up to use PHP as opposed to having PHP set up at the top level so its use is inherited by the individual sites.

PROBLEM ~ How can I configure IIS and PHP to be able to host multiple virtual server websites with different PHP.ini instructions? (For example, one site needs Zend and I don’t want Zend to be available to other sites)

I've tried putting a copy of php.ini in the individual server/site root folders, and deleting the copy from c:\winnt, and rebooting the system. Phpinfo still shows that PHP is using PHP.ini from c:\winnt, even though it's gone! Can anyone explain what’s going on here?

PHP is supposed to look for a php.ini file as follows ~
1. PHPIniDir directive (Apache only - so does not apply)

2.HKEY_LOCAL_MACHINE\SOFTWARE\PHP\IniFilePath (this is NOT in the registry !)

3. a) Directory of PHP (for CLI - not what we're using), or
b) the web server's directory (for SAPI modules This applies - we are using SAPI; tried this; doesn't work)

4. Windows directory (this is the only place it looks)

Thanks for your assistance !!!
:?:
homeshow
Forum Newbie
Posts: 4
Joined: Thu Nov 24, 2005 1:39 pm
Location: Denver, Colorado, USA

CLOSED

Post by homeshow »

Unresponsive forum
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

I'm not sure if it's possible... or if it is, how you would do it with IIS.

With apache you can use .htaccess files. You can set ini values using the PHP function ini_set() too ;)

I think nobody responded because nobody knew if it is possible with IIS ;)
User avatar
HCBen
Forum Commoner
Posts: 33
Joined: Thu Jun 22, 2006 3:15 pm
Location: Indiana

Re: IIS & PHP Setup question-How to host multiple websites

Post by HCBen »

(Dug this old post up from the grave...)

Has anyone been successful in running multiple php sites on the same Windows server using separate php.ini files with IIS? *

*Note: I've successfully manage to run multiple php sites with separate ini files IF each site uses a different ".php" extension.
Example: site1 uses ".php", site2 uses ".php5", site3 uses ".phpwhateveriwanttocalltheextension", etc...
However, this is isn't desirable in my case and simply isn't practical.

I hope in two years someone has been able to figure this out.

Thanks,
Ben
Post Reply