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

From: Date: Thu, 02 Nov 2000 11:21:49 +0000
Subject: Re: cvs: php4 /sapi/cgi cgi_main.c
References: 1  Groups: php.cvs 
Request: Send a blank email to php-cvs+get-2456@lists.php.net to get a copy of this message
> Are you sure about this patch? In CGI mode, I don't think we're supposed > to be getting the filename from the command line...? after the spec. no. but we are using path_translated | script_name, if it fails and the webserver has given it via the commandline we use it. this appiles for some webservers and afaik perl and python are behaving the same like i said i really don't see any drawback. daniel > Zeev > > At 11:55 03/11/2000, 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 > > -- > Zeev Suraski <zeev@zend.com> > http://www.zend.com/ > > > -- > 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 > > /*-- daniel beulshausen - daniel@php4win.de using php on windows? http://www.php4win.de

« previous php.cvs (#2456) next »