Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have used the Web Platform Installer 2.0 beta to install php on IIS6.

I tried this first on a test server with success.

When I did this on the production server and browse to a test php file, I see:

The page cannot be found

Is there anything I need to configure in IIS 6 to get this working?

share|improve this question
add comment

3 Answers

up vote 3 down vote accepted

There are a number of things you need to check:

  • Have you setup the .php extension in IIS?
  • Is the PHP extension mapped to the PHP DLL?
  • Is the PHP web service extension setup?
  • Is the PHP web service extension allowed?

This article shows the steps for setting up PHP manually, it may be worth following it through to check you have all steps completed.

share|improve this answer
    
I haven't done any of that because the Web Platform Installer uses fastcgi. Why did this work perfectly on my test server but not on production? –  Ronnie Overby Jun 10 '09 at 15:36
    
Fast CGI uses thes the same process, it just references a different DLL to normal CGI or ISAPI. I do not know why it would work in test but not live, there may be some configuration differences between the two servers, maybe the extension had already been authorised on the test server, I would check each of those options in IIS and see if they are causing you the issue, then you can look at why the installer didn't set them properly. –  Sam Jun 10 '09 at 15:42
    
I found that the php extension wasnt mapped to the fasgcgi dll automatically. I don't know why it did on the test server, but not the production. Anyway I mapped it manually and that did the trick. Thanks. –  Ronnie Overby Jun 10 '09 at 15:45
1  
After installing FastCGI and PHP with the web platform installer, you can install this automatically with this command: cscript %windir%\system32\inetsrv\fcgiconfig.js -add -section:"PHP" -extension:php -path:"c:\Program Files\PHP\php-cgi.exe" –  crb Jun 18 '09 at 1:45
add comment

If you are attempting to go to index.php by addressing the root of a folder (i.e. http://localhost/) and you are getting a 404, then you may need to add index.php to the list of default documents.

If you are getting a 404 error trying to access a specific page (i.e. http://localhost/index.php), then there may be an issue with how you are attempting to access the page - not necessarily a problem with the php config in IIS.

If I remember correctly, when php is not configured correctly, you would get a mime-type error which may attempt to save a copy of the page, but not a file not found error.

Also, in IIS6, FastCGI needs to be installed (download it here) and enabled through the "add Windows components" tool.

share|improve this answer
add comment

I had the exact same problem which was due to manual ISAPI installs of old installations of php.

The problem is just the configuration of "Default Web Site", click properties -> Home Directory -> Configuration.

Scroll to .php and change the executable path to: C:\WINDOWS\system32\inetsrv\fcgiext.dll (previously this will have been C:\Program Files\PHP\php5isapi.dll)

Click the Limit to: and type GET,HEAD,POST

Done.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.