]> granicus.if.org Git - php/commitdiff
- Commit Kristian's PHP 3 patch to PHP 4. Kristian I hope it's also the
authorAndi Gutmans <andi@php.net>
Wed, 11 Oct 2000 17:48:44 +0000 (17:48 +0000)
committerAndi Gutmans <andi@php.net>
Wed, 11 Oct 2000 17:48:44 +0000 (17:48 +0000)
  same here.

sapi/cgi/cgi_main.c

index f5d2e88751819ab7de4b809fdbe1e148f1f2b27a..e1242b07fbb29e5c462eefcc4d3c36d93d0ad863 100644 (file)
@@ -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\