Page 1 of 1

Security Alert Error!

Posted: Sat Jan 31, 2004 1:26 am
by sachin
Hi Everyone,

I am prompted with the following error while running a php file. Below is the contents of the error:

This PHP CGI binary was compiled with force-cgi-redirect enabled. This means that a page will only be served up if the REDIRECT_STATUS CGI variable is set.

I would appreciate if I could be provided the guidance.

Thanks,

Sachin

Posted: Sat Jan 31, 2004 7:43 am
by Derfel Cadarn
I think you've installed PHP as cgi (that is: not the standard way). I just googled for force-cgi-redirect and got these links from php.net:force-cgi-redirect.
Else you could try the apache-site if you're using Apache as server.

Posted: Sat Jan 31, 2004 10:34 am
by twigletmac
Which webserver are you trying to use?

Mac

Posted: Sun Feb 01, 2004 10:04 pm
by sachin
Mac,

I am using IIS.

Thanks,

Sachin
twigletmac wrote:Which webserver are you trying to use?

Mac

Posted: Mon Feb 02, 2004 4:48 am
by twigletmac
Then you should find this bit in your php.ini:

Code: Select all

; 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 = 1
and change the value of cgi.force_redirect to look like:

Code: Select all

cgi.force_redirect = 0
Mac