angelleye Posted January 28, 2010 Share Posted January 28, 2010 I've got a test server setup at sandbox.mydomain.com on Win2k3 with IIS 6. I've got PHP installed on this server and it works great on the default web site in IIS. I've always had my client web sites under /client-sites on my default web site. The problem with this is that when my clients are using things like ./ in their links it goes back up to my actual root instead of their site's root (ie. sandbox.mydomain.com/client-sites/site-name). To fix this I've gone ahead and created additional A records in my DNS to point other sub-domains to my test server (ie. client.mydomain.com) and then I created a new site in IIS and applied the host header value of client.mydomain.com. With that I can successfully browse the client's site via http://client.mydomain.com, however, PHP does not work on these additional sites. It still works great on my default site in IIS, just not on any of the extra sites I add this way. I can browse HTML files, txt files, images, etc. just fine but anything PHP just gives me page not found. Any information on how I can make PHP work with ALL sites in IIS instead of just the default would be greatly appreciated. Thanks! Quote Link to comment Share on other sites More sharing options...
oni-kun Posted January 29, 2010 Share Posted January 29, 2010 The host header is not needed, what exactly are all the headers you are sending ? Quote Link to comment Share on other sites More sharing options...
angelleye Posted January 29, 2010 Author Share Posted January 29, 2010 Yes, the host header is needed because I'm hosting more than 1 site on the same IP address and the same port. That part is all working fine. I've figured out that when I comment out the doc_root in php.ini then PHP pages will indeed load on the sites, however, all of my relative links to includes like css, js, etc. aren't working when I do that. Apparently what I need is to specify separate php.ini files for each site, or specify multiple doc_root's in a single php.ini file. Possible..?? Quote Link to comment Share on other sites More sharing options...
winjp Posted May 11, 2010 Share Posted May 11, 2010 hello, does anyone find a solution I've got the same issue as described, html works fine but not php file. I'm using SBS2003, IIS 6.0 and PHP Version 5.2.6 Thanks Quote Link to comment Share on other sites More sharing options...
winjp Posted May 13, 2010 Share Posted May 13, 2010 dear all we found the solution .. For this who are interested to make it works we need to configure the .php extension (in my case to php5isapi.dll) for each web sites which is using PHP I did in the past for the default web site but forgot to do it for new ones take care Quote Link to comment Share on other sites More sharing options...
trq Posted May 13, 2010 Share Posted May 13, 2010 dear all we found the solution .. For this who are interested to make it works we need to configure the .php extension (in my case to php5isapi.dll) for each web sites which is using PHP I did in the past for the default web site but forgot to do it for new ones take care You can actually configure this on all sites by doing it at the very top of the websites tree within IIS. Quote Link to comment Share on other sites More sharing options...
trq Posted May 13, 2010 Share Posted May 13, 2010 Oh, and ps: You should really be using fastCGI under IIS. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.