summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndi Gutmans <andi@php.net>2000-10-11 17:48:44 +0000
committerAndi Gutmans <andi@php.net>2000-10-11 17:48:44 +0000
commitf3232e99c3ab47c195a960c7fd2500f7f370bc5f (patch)
treeffa40f56c2dfc90e67710621795e5b962d83e3b6
parent84f81c50ba34965551a2bc0a2c4d950b931b46d8 (diff)
downloadphp-git-f3232e99c3ab47c195a960c7fd2500f7f370bc5f.tar.gz
- Commit Kristian's PHP 3 patch to PHP 4. Kristian I hope it's also the
same here.
-rw-r--r--sapi/cgi/cgi_main.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c
index f5d2e88751..e1242b07fb 100644
--- a/sapi/cgi/cgi_main.c
+++ b/sapi/cgi/cgi_main.c
@@ -433,7 +433,13 @@ int main(int argc, char *argv[])
argv0 = NULL;
}
#if FORCE_CGI_REDIRECT
- if (!getenv("REDIRECT_STATUS")) {
+ /* Apache will generate REDIRECT_STATUS,
+ * Netscape and redirect.so will generate HTTP_REDIRECT_STATUS.
+ * redirect.so and installation instructions available from
+ * http://www.koehntopp.de/php.
+ * -- kk@netuse.de
+ */
+ if (!getenv("REDIRECT_STATUS") && !getenv ("HTTP_REDIRECT_STATUS")) {
PUTS("<b>Security Alert!</b> PHP CGI cannot be accessed directly.\n\
\n\
<P>This PHP CGI binary was compiled with force-cgi-redirect enabled. This\n\