2

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?

Ronnie Overby
  • 681
  • 2
  • 12
  • 24

3 Answers3

3

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.

Sam Cogan
  • 38,736
  • 6
  • 78
  • 114
  • 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 Cogan 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 01:45
1

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.

Rob Allen
  • 551
  • 1
  • 6
  • 11
1

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.