www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From George Veskov <h747...@hotmail.com>
Subject os-windows/7955: .EXE CGI script doesn't execute properly, executes while error condition exists
Date Fri, 29 Jun 2001 02:11:07 GMT

>Number:         7955
>Category:       os-windows
>Synopsis:       .EXE CGI script doesn't execute properly, executes while error condition
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    apache
>State:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Thu Jun 28 19:20:02 PDT 2001
>Originator:     h747186@hotmail.com
>Release:        1.3.20
Windows 2000 Professional (Windows NT 5.0) with 288 MB RAM; 1.2 GB used by Apache
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.
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.)
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.
 [In order for any reply to be added to the PR database, you need]
 [to include <apbugs@Apache.Org> 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!     ]

View raw message