PHP Installation
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsPHP RelatedPHP Installation

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old June 13th, 2003, 01:37 PM
qali qali is offline
Contributing User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 84 qali User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 37 m 55 sec
Reputation Power: 2
Security Alert! The PHP CGI cannot be accessed directly.

Hi,

I have turned on errors in the PHP.ini and I get this

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.

PHP: Error parsing C:WINNTphp.ini on line 260



I am a bit confused because I have already set CGI.FORCE_REDIRECT to 0

qali

Reply With Quote
  #2  
Old June 19th, 2003, 12:58 PM
zareef zareef is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Ghaziabad,Uttar Pardesh, India
Posts: 55 zareef User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Send a message via Yahoo to zareef
RE: Security Alert! The PHP CGI cannot be accessed directly.

<quote from="php.ini">
; 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

; if cgi.force_redirect is turned on, and you are not running under Apache or Netscape
; (iPlanet) web servers, you MAY need to set an environment variable name that PHP
; will look for to know it is OK to continue execution. Setting this variable MAY
; cause security issues, KNOW WHAT YOU ARE DOING FIRST.
; cgi.redirect_status_env = ;
</quote>

you have to set a env too like

cgi.redirect_status_env ="yes";

if it works? tell me?

Reply With Quote
  #3  
Old June 19th, 2003, 04:02 PM
drevele drevele is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Medina, Ohio
Posts: 233 drevele User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Send a message via AIM to drevele Send a message via Yahoo to drevele
RE: Security Alert! The PHP CGI cannot be accessed directly.

that will defently work.

Reply With Quote
  #4  
Old July 25th, 2003, 02:19 AM
shadowman shadowman is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Brampton, Ontario, Canada
Posts: 4 shadowman User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to shadowman Send a message via AIM to shadowman
RE: RE: Security Alert! The PHP CGI cannot be accessed directly.


Quote:
<quote from="php.ini">
; 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

; if cgi.force_redirect is turned on, and you are not running under Apache or Netscape
; (iPlanet) web servers, you MAY need to set an environment variable name that PHP
; will look for to know it is OK to continue execution. Setting this variable MAY
; cause security issues, KNOW WHAT YOU ARE DOING FIRST.
; cgi.redirect_status_env = ;
</quote>

you have to set a env too like

cgi.redirect_status_env ="yes";

if it works? tell me?



I didn't have to do that. I just set cgi.force_redirect = 0 and the system jumped alive. (Running under Xitami 2.4d9 / Win32). Maybe I'm just special. 8)

You sure that other guy removed the semicolon from in front? Silly question, I know, but I was silly enough to just change the 1 to a 0 at the end of the example without actually removing the semi-colon. Took me a few minutes before I realized what the real problem was! haha.

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP RelatedPHP Installation > Security Alert! The PHP CGI cannot be accessed directly.


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway