Solved

Running multiple PHP websites on one IIS server?

Posted on 2008-11-01
8
883 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

 

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: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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

Suggested Solutions

If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
This article discusses how to implement server side field validation and display customized error messages to the client.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

738 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