>Number: 1715 >Category: os-windows >Synopsis: '#!' CGI script can not spawn when CGI script called without >parameter '=' >Confidential: no >Severity: serious >Priority: medium >Responsible: apache >State: open >Class: sw-bug >Submitter-Id: apache >Arrival-Date: Wed Jan 21 18:40:00 PST 1998 >Last-Modified: >Originator: [EMAIL PROTECTED] >Organization: apache >Release: 1.3b3 Win32 >Environment: Windows 4.0 Visual C++ 5.0 >Description: WIN32 only bug.
PR#1030 modified bug when CGI is binary executable, but it not modified CGI is '#!' script. if you access URL such like: http://localhost/cgi-bin/perlscript&arg1+arg2+arg3 when $SERVERROOT/cbi-bin/perlscript.cgi content is: #!/usr/local/bin/perl ... apache 1.3b3 for WIN32 spawn /usr/local/bin/perl arg1 arg2 arg3 but, proper action is /usr/local/bin/perl perlscript.cgi arg1 arg2 arg3 >How-To-Repeat: http://localhost/cgi-bin/perlscript.cgi&arg1+arg2+arg3 perlscript.cgi: #!/usr/local/bin/perl ... >Fix: apache_1.3b3/src/main/util_script.c:769 change line 769 as follows: else if (is_script) { pid = spawnve(_P_NOWAIT, interpreter + 2, create_argv(r->pool, NULL, NULL, NULL, r->filename, r->args), env); } to: else if (is_script) { pid = spawnve(_P_NOWAIT, interpreter + 2, create_argv(r->pool, r->filename, NULL, NULL, r->filename, r->args), env); } %0 >Audit-Trail: >Unformatted: [In order for any reply to be added to the PR database, ] [you need to include <[EMAIL PROTECTED]> in the Cc line ] [and leave the subject line UNCHANGED. This is not done] [automatically because of the potential for mail loops. ]
