cvs: php3 / main.c
| From: | Kristian K�hntopp | Date: | Wed, 11 Oct 2000 09:31:30 +0000 |
| Subject: | cvs: php3 / main.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-1980@lists.php.net to get a copy of this message | ||
kk Wed Oct 11 02:31:30 2000 EDT
Modified files:
/php3 main.c
Log:
- Fixed for Netscape Server (CGI Setup) with redirect.so.
redirect.so is available from http://www.koehntopp.de/php
(search for Netscape).
Index: php3/main.c
diff -u php3/main.c:1.515 php3/main.c:1.516
--- php3/main.c:1.515 Sat Sep 30 10:32:44 2000
+++ php3/main.c Wed Oct 11 02:31:30 2000
@@ -29,7 +29,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: main.c,v 1.515 2000/09/30 17:32:44 sas Exp $ */
+/* $Id: main.c,v 1.516 2000/10/11 09:31:30 kk Exp $ */
/* #define CRASH_DETECTION */
@@ -1671,7 +1671,13 @@
GLOBAL(request_info).php_argv0 = strdup(argv[1]);
else GLOBAL(request_info).php_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")) {
if (php3_header())
PUTS("<b>Security Alert!</b> PHP CGI cannot be accessed directly.\n\
\n\