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
Security Alert Error!
Moderator: General Moderators
- Derfel Cadarn
- Forum Contributor
- Posts: 193
- Joined: Thu Jul 17, 2003 12:02 pm
- Location: Berlin, Germany
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.
Else you could try the apache-site if you're using Apache as server.
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
Then you should find this bit in your php.ini:
and change the value of cgi.force_redirect to look like:
Mac
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 = 1Code: Select all
cgi.force_redirect = 0