Solved

Running multiple PHP websites on one IIS server?

Posted on 2008-11-01
8
881 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

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

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

777 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