Scott Hanselman

HTTP Error 404.17 - PHP on IIS7 under 64bit Vista

October 17, '07 Comments [5] Posted in IIS | Vista | PHP
Sponsored By

IIS 7.0 Detailed Error - 404.17 - Not Found - Windows Internet Explorer If you're getting...

"HTTP Error 404.17 - Not Found - The requested content appears to be script and will not be served by the static file handler."

...on Vista while trying to get PHP working under IIS7 with the standard ISAPI "php5isapi.dll" ask yourself, are you running 64-bit? That ISAPI DLL is a 32-bit DLL, so you'll have to either change your default Application Pool to enable 32-bit, or preferably create a separate 32-bit AppPool for your PHP Application.

Right click on the Application Pool and select "Advanced Settings" then "Enable 32-bit Applications."

Advanced Settings

At this point, you're all set with the standard ISAPI PHP stuff. 

phpinfo() - Windows Internet Explorer

Even better, consider using the FastCGI for IIS component. I'll do a screencast on that soon.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. I am a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by ORCS Web
Wednesday, October 17, 2007 11:28:14 AM UTC
Thanks for the info. Seems to be a good blog to be in touch with.
Wednesday, October 17, 2007 4:36:37 PM UTC
ISAPI would be my 3rd choice for running PHP on IIS 7. First FastCGI, second CGI. ISAPI is unstable. CGI is slow.

Additionally, on x64 ISAPI requires your php5isapi.dll be the same bitness as w3wp.exe, whereas with CGI and FastCGI php-cgi.exe can be a different bitness to w3wp.exe.
rick
Wednesday, October 17, 2007 4:52:57 PM UTC
This is the first PHP post I've seen here - I thought you were mostly a visual studio guy.

But good to see ! More PHP posts pl.

For starters what's your preferred editor / environment for php coding ?

Thanks for the great postings - keep'em coming!
Wednesday, October 17, 2007 7:05:52 PM UTC
Look at your CPU usage when hitting a PHP page on IIS7 using ISAPI. I think I've been told that it eats up CPU in that configuration.
John A. Davis
Wednesday, October 17, 2007 8:23:59 PM UTC
There is another obscure reason for why you can get a 404 error using PHP on IIS. It's got to do with the way the ISAPI extension is registered in IIS. Sometimes the filename to the PHP ISAPI Dll gets registered in the 8.3 format and that messes things up:

http://blog.gadodia.net/php-5-on-iis-6-giving-404-error-and-how-to-fix-it/

I really had a tough time figuring that one out...
Comments are closed.

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.