Solved

Running multiple PHP websites on one IIS server?

Posted on 2008-11-01
8
878 Views
Last Modified: 2010-01-27
Does anyone have any advice as to how run multiple websites on an IIS server, with PHP? I use host headers to direct traffic to a number of virtual web servers - one of which uses PHP.

I wanted to run another site which needed a completely different PHP setup, but no matter what I did, it always somehow merged the two. Does anyone have any kind of document or related link which goes into detail as to how to tackle this problem?

I have googled for quite a while now and have only seen similar questions but no answers. I've now even dabbled in running vmware with multiple instances of Windows Server in order to run different PHP configs - surely there is a way of breaking up config so each site is unique?
0
Comment
Question by:dmad79
8 Comments
 
LVL 2

Expert Comment

by:nidash
ID: 22856338
0
 
LVL 12

Accepted Solution

by:
adrian_brooks earned 500 total points
ID: 22859693
Basically, in your IIS manager, you need to create a new site, which I'm sure you have already done.
You would need to have the PHP windows installation part already handled also. The trick to making multiple PHP sites available on your IIS server is that each new site that would be using PHP would have it's own PHP.ini file so that it had it's own config settings for that particular instance of PHP on that particular site.

I'm seriously not an expert on this topic and defer to the Windows gurus that know more about this, but from the PHP side of things, I do know that you can configure PHP for each site individually whether you're on an IIS server on windows or an Apache server on a *nix based OS. Both highly rely upon the PHP.INI files for their aster configuration settings and then at a site level also.

Another thing too is that in each site definition on IIS, you will want to designate that .php extentions will be using your php.exe (I believe) for passing control to the php compiler when a .php extension is encountered.

I don't know if this offered anything of value, but it's my 2 cents.
0
 

Author Comment

by:dmad79
ID: 22860704
Hi Adrian

Yes, you have added value by simply replying and reinforcing my will that it is achievable. I think I have 2 problems - the problem in my question and the other that I gave up on this a while back and need to go over the specifics.

I think the biggest issue was that I couldn't get each website to refer to the php.ini in any other location than within c:/php/  

I suppose I'm ultimately more interested in either the theory or a specific guide, which might be in the post above yours. I can't quite remember where within the actual site, the reference to the PHP ini file is....
0
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 

Author Comment

by:dmad79
ID: 22860706
Nidash - thanks - but no cigar. Multiple sites is not the problem - it's multiple sites with difference PHP configurations....
0
 
LVL 2

Expert Comment

by:nidash
ID: 22860796
OK. is this a production site or dev? and what sort of different configurations you are talking about? if this is development and you would want work on one site at a time how about having different versions of php.ini and controlling them via a batch file?

also what about setting these parameters in the initial page of these websites? are we talking one version of PHP?
0
 

Author Comment

by:dmad79
ID: 22876490
Hi Nidash

We're talking development system. For different instances, I use Kayako on one site to provide a helpdesk, which uses things like Zen to authorise the license. It has a unique PHP.ini which tends to be different from what, say vbulletin or a wordpress sites wants to see.

So say I wanted three different sites, all needing a slightly different php.ini file, how do I go about it!?

Thanks
0
 
LVL 11

Expert Comment

by:Andrew Angell
ID: 26424916
I'd love to get an answer on this.  I've run into this same issue.
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

This article discusses how to create an extensible mechanism for linked drop downs.
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now