Security Alert Error!

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
sachin
Forum Newbie
Posts: 2
Joined: Sat Jan 31, 2004 1:26 am

Security Alert Error!

Post 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
User avatar
Derfel Cadarn
Forum Contributor
Posts: 193
Joined: Thu Jul 17, 2003 12:02 pm
Location: Berlin, Germany

Post 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.
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

Which webserver are you trying to use?

Mac
sachin
Forum Newbie
Posts: 2
Joined: Sat Jan 31, 2004 1:26 am

Post by sachin »

Mac,

I am using IIS.

Thanks,

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

Mac
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post 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
Post Reply