Technology TidBits

Answers to various technical questions on php programming, mysql, linux, and many more categories.
25% off Hosting at HostGator.com:
Use Code techbits25



What causes an Error 400 when running php on IIS?

Last updated: 06/29/2009
When installing php on IIS, you may get an Error 400 trying to run any php scripts.

Edit php .ini and change the following setting:

; cgi.force_redirect is necessary to provide security running PHP as a CGI under
; most web servers.  Left undefined, PHP turns this on by default.  You can
; turn it off here AT YOUR OWN RISK
; **You CAN safely turn this off for IIS, in fact, you MUST.**
cgi.force_redirect = 0

blog comments powered by Disqus
Have your own Tech-bit to contribute? Submit it here

Other questions in this category:
I'm getting a 404 error (File not Found) when trying to use SSI on Windows server 2003 and IIS - what gives?
How do I enable SSI (Server Side Includes) on IIS 7.x (1&1 dedicated sever) ?
My perl scripts keep timing out on IIS.
I get an error connecting to MS SQL Server from my php script on windows



Powered by KnowledgebasePublisher 1.1
Host Gator
Content provided by Roberts WebForge, Inc.