faqts : Computers : Programming : Languages : PHP : Installation and Setup : Security

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

11 of 21 people (52%) answered Yes
Recently 4 of 10 people (40%) answered Yes

Entry

After installing I get "Security Alert! The PHP CGI cannot be accessed directly. "

Feb 2nd, 2003 12:20
anatoly techtonik, Brian Seater, http://pub26.ezboard.com/fbadbluediscussfrm9.showMessage?topicID=138.topic


Make sure your PHP.INI file (in the Windows directory) has the 
following lines in it:

; 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
cgi.force_redirect=0

Note that the semicolon in front of cgi.force_redirect=0 must be 
missing! This 'uncomments' the line and lets PHP 'see' the command.