Running multiple PHP websites on one IIS server?

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?
dmad79Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Richard DavisSenior Web DeveloperCommented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
dmad79Author Commented:
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
Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

dmad79Author Commented:
Nidash - thanks - but no cigar. Multiple sites is not the problem - it's multiple sites with difference PHP configurations....
0
nidashCommented:
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
dmad79Author Commented:
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
Andrew AngellCo-Owner / DeveloperCommented:
I'd love to get an answer on this.  I've run into this same issue.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.