Re: cvs: php4 /sapi/cgi cgi_main.c

From: Date: Fri, 03 Nov 2000 10:43:00 +0000
Subject: Re: cvs: php4 /sapi/cgi cgi_main.c
References: 1  Groups: php.cvs 
Request: Send a blank email to php-cvs+get-2453@lists.php.net to get a copy of this message
Can you please explain this patch? It worked before. What was the problem? Specific to a certain web server? Andi At 09:55 AM 11/3/00 +0000, Daniel Beulshausen wrote:
dbeu            Fri Nov  3 01:55:55 2000 EDT
Modified files:
    /php4/sapi/cgi      cgi_main.c
Log: use argv[1] if it's given, thanks to Bob Denny <rdenny@dc3.com> Index: php4/sapi/cgi/cgi_main.c diff -u php4/sapi/cgi/cgi_main.c:1.81 php4/sapi/cgi/cgi_main.c:1.82
--- php4/sapi/cgi/cgi_main.c:1.81       Tue Oct 31 08:16:57 2000
+++ php4/sapi/cgi/cgi_main.c    Fri Nov  3 01:55:54 2000
@@ -702,10 +702,14 @@
        }
        if (cgi && !file_handle.handle.fp) {
-               PUTS("No input file specified.\n");
-               php_request_shutdown((void *) 0);
-               php_module_shutdown();
-               return FAILURE;
+               file_handle.handle.fp = V_FOPEN(argv0, "rb");
+               if(!file_handle.handle.fp) {
+                       PUTS("No input file specified.\n");
+                       php_request_shutdown((void *) 0);
+                       php_module_shutdown();
+                       return FAILURE;
+               }
+               file_handle.filename = argv0;
        } else if (file_handle.handle.fp && file_handle.handle.fp!=stdin) {
                /* #!php support */
                c = fgetc(file_handle.handle.fp);
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-cvs-unsubscribe@lists.php.net For additional commands, e-mail: php-cvs-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net
--- Andi Gutmans <andi@zend.com> http://www.zend.com/

« previous php.cvs (#2453) next »