473,322 Members | 1,703 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

PHP IIS6 and Virtual Directory problems

1
Hi
Just thought I'd post this as I've been searching for a solution to this for ages and found nothing!!

The Problem:
Windows Server 2003, PHP 5 and IIS6

PHP works fine in the default webserver wwwroot (and all subfolders)
BUT it doesn't work in any virtual directory - gives a 404

The virtual directories are set up fine, since any *.html file will open (so its not a permissions thing)
BUT any php file (including phpinfo.php) will not run, returning a 404 file not found error

The solution:
in php.ini the doc_root needs to be set to nothing (ie blank)

Easy when you know how
:)
Apr 25 '06 #1
5 12486
Hi
Just thought I'd post this as I've been searching for a solution to this for ages and found nothing!!

The Problem:
Windows Server 2003, PHP 5 and IIS6

PHP works fine in the default webserver wwwroot (and all subfolders)
BUT it doesn't work in any virtual directory - gives a 404

The virtual directories are set up fine, since any *.html file will open (so its not a permissions thing)
BUT any php file (including phpinfo.php) will not run, returning a 404 file not found error

The solution:
in php.ini the doc_root needs to be set to nothing (ie blank)

Easy when you know how
:)
Thank you. After countless hours of Google searches and reinstalling this and that, this finally solved my problem.
Jul 31 '06 #2
bj99
1
Thanks also for the solution since none of the general instructions mention it and I wasted a lot of time trying to puzzle out why it didn't work. The solution also works with IIS5.1 Remember when testing that .htm files with PHP commands will not execute their PHP code; the file extension must be .php
Nov 23 '06 #3
You're a saint. Such a simple thing but it was driving me crazy.

Needless to say it worked. Blanked the setting and rebooted. Poof!
Feb 19 '08 #4
Thank you! This really works. In my case I had to restart the computer first to see the changes..now it works!
Jul 21 '08 #5
This is primarily to say thanks for your post that ended a few days of frustration.

It does work, but why?
May 1 '12 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: yukon | last post by:
Hi there the next is my platform IIS5 windows 2000 asp vbscript My working area has the next virtual directoy: testAc (corrective ambient) testAe (evolutionary ambient)
0
by: Mike Dorey via DotNetMonster.com | last post by:
Hi/ I am getting to grips with the UIP Block, but have had problems running an application that works as a virtual directory as an IIS6 Web Site. E.g. in my initial page I issue an...
1
by: Dave | last post by:
I am getting te following error in a ASP.Net app that is running on Win XP Pro (SP2): Server cannot access application directory 'C:\Documents and Settings\dave\My Documents\My Visual Studio...
8
by: Nate | last post by:
I am running on Window 2003. I have a website built in ASP.NET 2.0. I need to have a Virtual Directory running an application in 1.1. I have configured each in its own Application Pool. The 1.1...
1
by: Webmills | last post by:
Has anyone come across the problem that I am experiencing? I have a master page using four or five Hyperlink controls, each with an ImageUrl. The ImageUrl is specified using a virtual directory...
2
by: tshad | last post by:
I am trying to use my IIS web server on my local machine for testing my web site. The problem is that periodically it will not use the virtual directory for the root. This happens for my...
4
by: lspoulin | last post by:
Hi, We have a webpage browsing folders within the wwwroot. We need to access a remote shared directory the same way. We created a virtual directory in IIS with an alias pointing on this...
0
by: Uwe | last post by:
Hi, I'm currently developing an ASP.NET application with my own MembershipProvider. Login works fine on my local machine (IIS7) in a virtual directory of IIS. I just deployed the application to a...
6
by: Scott M. | last post by:
I didn't get a resolution to this in my earlier post, so I'll try again: System: Windows XP Pro. (SP2) with IIS installed and running PRIOR to VS 2008 Pro. installation. VS 2008 Pro. (full...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.