Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Small PHP Server

Status
Not open for further replies.

BB101

Programmer
May 23, 2001
337
GB
I am trying to write a small PHP web server in VB, having got all the environment vars to go in properly I am now struggling to find the answer to this question:

How do you turn off the security, or at least get around it!

When I try and view a page I get the following:

Content-type: text/html Security Alert! The PHP CGI cannot be accessed directly. 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, e.g. via an Apache Action directive.

For more information as to why this behaviour exists, see the manual page for CGI security.

For more information about changing this behaviour or re-enabling this webserver, consult the installation file that came with this distribution, or visit the manual page.

I've tried changing the PHP.ini setting cgi.force_redirect to off, 0, no and any other negative thing I could think of to no avail --BB
 
I found out that you set the environment variable REDIRECT_STATUS to FALSE and it works!

Anyone explain how that's secure? --BB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top