Received: (qmail 56085 invoked by uid 501); 29 Jun 2001 02:11:07 -0000
Message-Id: <20010629021107.56081.qmail@apache.org>
Date: 29 Jun 2001 02:11:07 -0000
From: George Veskov
Reply-To: h747186@hotmail.com
To: submit@bugz.apache.org
Subject: .EXE CGI script doesn't execute properly, executes while error condition exists
X-Send-Pr-Version: 3.110
>Number: 7955
>Category: os-windows
>Synopsis: .EXE CGI script doesn't execute properly, executes while error condition exists
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: apache
>State: closed
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: apache
>Arrival-Date: Thu Jun 28 19:20:02 PDT 2001
>Closed-Date: Fri Jun 29 14:25:56 PDT 2001
>Last-Modified: Fri Jun 29 14:25:56 PDT 2001
>Originator: h747186@hotmail.com
>Release: 1.3.20
>Organization:
>Environment:
Windows 2000 Professional (Windows NT 5.0) with 288 MB RAM; 1.2 GB used by Apache
>Description:
I have a script called cgi1.exe in a /cgi-win/ folder, which has the ExecCGI option enabled, i.e. it can contain cgi scripts. Running a batch file from that
directory is fine, but when I run the cgi1.exe file, I always get this error:
attempt to invoke directory as script: e:/httpd/apache/cgi-win
While Apache gives me this error, the first 2000 bytes of the script's output ARE SENT out the the client. Because of this, if the script's output is less than 2000 bytes, I can't even tell there's an error without looking at the error log. My script, however, is a discussion forum, and it's output exceeds 2000 bytes. (Some HTML gets cut off). I have already tested the script, and it does output all the data when run in a DOS prompt.
>How-To-Repeat:
The full script URL is: http://jkansoft.mine.nu/cgi-win/cgi1.exe
Also I guess it can be done on a Win32 platform by placing an .exe file in the
/cgi-bin/ folder. (It should try to output more than 2k of data, and not be a .BAT file, they work ok.)
>Fix:
I really don't know what's happening here, and I did read about all the known errors and ways to install an .EXE handler. (I tried all of that) Whatever I do, it won't work. For example, this didn't fix my problem:
AddHandler cgi-script .exe
My hypothesis is that the server sees something's wrong and then allocates the 2000 bytes for a possible ErrorDocument?? but then lets the script being executed fill them with data. I.E. I think the server is displaying my script's partial output in place of the proper ErrorDocument that should've been shown.
>Release-Note:
>Audit-Trail:
From: "George Veskov_"
To: submit@bugz.apache.org, apache-bugdb@apache.org
Cc:
Subject: Re: os-windows/7955: .EXE CGI script doesn't execute properly, executes while error condition exists
Date: Fri, 29 Jun 2001 03:46:37 -0000
>From: submit@bugz.apache.org
>Reply-To: submit@bugz.apache.org, apache-bugdb@apache.org
>To: h747186@hotmail.com
>Subject: Re: os-windows/7955: .EXE CGI script doesn't execute properly, executes while error condition exists
>Date: 29 Jun 2001 02:20:03 -0000
>
>Thank you very much for your problem report.
>It has the internal identification `os-windows/7955'.
>The individual assigned to look at your
>report is: apache.
>
> >Category: os-windows
> >Responsible: apache
> >Synopsis: .EXE CGI script doesn't execute properly, executes while error condition exists
> >Arrival-Date: Thu Jun 28 19:20:02 PDT 2001
Bug not in Apache! There really was a bug, but it was in Windows instead. Sorry for the disturbance, everything works good now.
Get your FREE download of MSN Explorer at http://explorer.msn.com
State-Changed-From-To: open-closed
State-Changed-By: slive
State-Changed-When: Fri Jun 29 14:25:55 PDT 2001
State-Changed-Why:
Submitter reports bug not in Apache.
>Unformatted:
[In order for any reply to be added to the PR database, you need]
[to include in the Cc line and make sure the]
[subject line starts with the report component and number, with ]
[or without any 'Re:' prefixes (such as "general/1098:" or ]
["Re: general/1098:"). If the subject doesn't match this ]
[pattern, your message will be misfiled and ignored. The ]
["apbugs" address is not added to the Cc line of messages from ]
[the database automatically because of the potential for mail ]
[loops. If you do not include this Cc, your reply may be ig- ]
[nored unless you are responding to an explicit request from a ]
[developer. Reply only with text; DO NOT SEND ATTACHMENTS! ]