You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apache-bugdb@apache.org by Heinz-Peter Arndt <he...@hp.com> on 1999/08/24 14:04:31 UTC
general/4898: 1.3.9 cgi exec is broken if script is calling other programs which delivers on stdout
>Number: 4898
>Category: general
>Synopsis: 1.3.9 cgi exec is broken if script is calling other programs which delivers on stdout
>Confidential: no
>Severity: critical
>Priority: medium
>Responsible: apache
>State: open
>Class: sw-bug
>Submitter-Id: apache
>Arrival-Date: Tue Aug 24 05:10:00 PDT 1999
>Last-Modified:
>Originator: heinz-peter_arndt@hp.com
>Organization:
apache
>Release: 1.3.9
>Environment:
OS: Windows NT 4.0 , ServicePacke 5
Visual C++ 5.0
>Description:
With the new apache version 1.3.9 I have the effect that no output is
delivered from cgi-scripts if this output is produced from other child
programs (except batch scripts) inside the
script. The behavior is different if I start apache as a console
application. I this case new windows pop up, with the expected contents, but
not returned to the connected client.
>How-To-Repeat:
======
@echo off
echo Content-type: text/html
echo.
echo on
echo "<html>"
echo "<pre>"
echo '-----------------'
C:\winnt\system32\cmd.EXE /A hugo
date
h:\l\CYGWIN~1\CYGWIN~1\H-I586~1\bin\sh.EXE -c date
h:\l\perl-active-517\bin\perl.EXE -V
echo '================='
set
echo "</pre>"
echo "</html>
======
>Fix:
One fix was given
by Bill Stoddard <st...@raleigh.ibm.com>
in comp.infosystems.www.servers.ms-windows
which fixes this problem on my configuration.
> It does appear broken. If you have a compiler available, here is what you can
> do to change the behaviour. In file util_script.c, find the CreateProcess().
> On CreateProcess, change DETACHED_PROCESS to 0. This is breaking 16 bit CGIs as
> well.
Bill
>Audit-Trail:
>Unformatted:
[In order for any reply to be added to the PR database, you need]
[to include <ap...@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! ]