Solved

Running multiple PHP websites on one IIS server?

Posted on 2008-11-01
8
882 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
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

 

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
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…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to count occurrences of each item in an array.

808 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