2

I am running IIS 6.0 on Windows Server 2003 using FastCGI. I have followed the instructions here:

http://www.php.net/manual/en/install.windows.iis6.php

including this line in my command prompt:

cscript %windir%\system32\inetsrv\fcgiconfig.js -add -section:"PHP" ^ -extension:php -path:"C:\PHP\php-cgi.exe"

However, my server does not recognise .php files. How do I configure my server to send php files to the php-cgi.exe, instead of downloading them?

Question is copied from https://stackoverflow.com/questions/6905811/server-cannot-process-php-files-downloads-them-instead

lowzhien
  • 21
  • 1
  • In my IIS Manager, I right clicked Web Sites -> Properties -> Set "Execute Permissions" to "Scripts Only". Also, in Configurations, ".php" is set to the php-cgi.exe. – lowzhien Aug 02 '11 at 00:35
  • have you tried restarting the server? – Jeune Aug 01 '11 at 23:53
  • PHP appears to be working. I can run my hello world program from the command prompt using php.exe and php-cgi.exe. The issue seems to be getting the server to associate php files with the executable. – lowzhien Aug 01 '11 at 23:56
  • @jeune No. It would take down an unknown number of services on my business, so I'd leave that as a last resort. Any other ideas what is causing the problem? – lowzhien Aug 01 '11 at 23:57
  • You can always align with your services that you will have a down time of say 10 minutes to restart. Isn't that possible? – Jeune Aug 02 '11 at 00:01
  • it might be a webserver issue, setting your file handler to php extensions. – hornetbzz Aug 02 '11 at 00:12
  • FYI I've restarted Internet Services, and the browser still displays the open/save file dialog when I double click a php file. How do I set my file handler to handle php extensions? – lowzhien Aug 02 '11 at 00:24

1 Answers1

1

If you open your IIS manager and browse to "Web Service Extensions" under your server, do you see "PHP ISAPI" in the right pane?

(from here: http://www.iisadmin.co.uk/?p=4&page=2)

Matt Simmons
  • 20,396
  • 10
  • 68
  • 116