www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Malcolm <jmalcolm2...@hotmail.com>
Subject os-windows/7717: CGI Execution Problem
Date Mon, 14 May 2001 06:37:14 GMT

>Number:         7717
>Category:       os-windows
>Synopsis:       CGI Execution Problem
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    apache
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Sun May 13 23:40:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     jmalcolm2000@hotmail.com
>Release:        1.3.19-win
>Organization:
apache
>Environment:
Windows98 4.10 (Build 2222) DOS 7.10.
>Description:
I've set up a Win98 machine with Apache for web development purposes. I've installed PHP,
etc. fine and everything is working alright except getting CGI scripts to execute correctly.
The results of trying to call a perl script are not consistant. Here is a sample of my error
log:

[Sun May 13 23:31:31 2001] [error] [client 127.0.0.1] couldn't spawn child process: d:/program
files/apache group/apache/cgi-bin/hello2.pl
[Sun May 13 23:32:06 2001] [error] [client 127.0.0.1] couldn't spawn child process: d:/program
files/apache group/apache/cgi-bin/printenv.pl
[Sun May 13 23:32:48 2001] [error] [client 127.0.0.1] couldn't spawn child process: d:/program
files/apache group/apache/cgi-bin/printenv.pl
[Sun May 13 23:33:12 2001] [error] [client 127.0.0.1] couldn't spawn child process: d:/program
files/apache group/apache/cgi-bin/printenv.pl
[Sun May 13 23:33:15 2001] [error] [client 127.0.0.1] couldn't spawn child process: d:/program
files/apache group/apache/cgi-bin/printenv.pl
[Sun May 13 23:37:43 2001] [error] [client 127.0.0.1] couldn't spawn child process: d:/program
files/apache group/apache/cgi-bin/printenv.pl
[Sun May 13 23:38:39 2001] [error] [client 127.0.0.1] d:/program files/apache group/apache/cgi-bin/printenv.pl
is not executable; ensure interpreted scripts have "#!" first line
[Sun May 13 23:38:39 2001] [error] [client 127.0.0.1] couldn't spawn child process: d:/program
files/apache group/apache/cgi-bin/printenv.pl
[Sun May 13 23:38:41 2001] [error] [client 127.0.0.1] d:/program files/apache group/apache/cgi-bin/printenv.pl
is not executable; ensure interpreted scripts have "#!" first line
[Sun May 13 23:38:41 2001] [error] [client 127.0.0.1] couldn't spawn child process: d:/program
files/apache group/apache/cgi-bin/printenv.pl
[Mon May 14 00:18:16 2001] [error] [client 127.0.0.1] Premature end of script headers: d:/program
files/apache group/apache/cgi-bin/printenv.cgi
[Mon May 14 00:20:00 2001] [error] [client 127.0.0.1] malformed header from script. Bad header=hello:
d:/program files/apache group/apache/cgi-bin/hello2.pl
[Mon May 14 00:20:36 2001] [error] [client 127.0.0.1] malformed header from script. Bad header=hello:
d:/program files/apache group/apache/cgi-bin/hello2.pl
[Mon May 14 00:22:02 2001] [error] [client 127.0.0.1] Premature end of script headers: d:/program
files/apache group/apache/cgi-bin/printenv.cgi
[Mon May 14 00:23:54 2001] [error] [client 127.0.0.1] Premature end of script headers: d:/program
files/apache group/apache/cgi-bin/hello2.cgi

Now, the odd thing is that I made no changes to the configuration after the sixth error message
listed above. This was because I got the script to finally execute correctly...ONCE! I tried
to execute it again and got an error. Then it worked, and then another error. After the last
error, every time I tried to call the script, my browser treated it as a binary and tried
to download it instead of the server executing it. Keep in mind that I still hadn't made any
changes to my configuration since the sixth error listed above.

I read the report about spaces in the ServerRootDirectory, and changed my document root to
one in which there were no spaces, with the new cgi-bin directory under it. I made the changes
to the configuration files to point to the new directories, but that still didn't take care
of the problem. I stopped getting entries in the error log, but the server still won't execute
the scripts! Every time I call a script (ie. http://localhost/cgi-bin/hello.cgi), it opens
a download window in my browser.

Now, I'm not exactly new to using Apache, at least on Linux boxes, but this problem has me
totally stumped. Is there something specific with Windows that needs to be done to get the
server to execute the scripts, is it a bug in the Windows version of Apache that still needs
to be addressed, or am I just too stupid to figure out how to set this up on a Windows maching?
:) I've checked and re-checked everything and I cannot find out why Apache is acting this
way when it comes to executing scripts. Perl works fine from the DOS window, the scripts I
used for testing were straight forward (as you can see one was the basic "hello" script),
and everything else seems to be set up correctly.

Any ideas?
>How-To-Repeat:
I have no idea.
>Fix:
I wish. :)
>Release-Note:
>Audit-Trail:
>Unformatted:
 [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!     ]
 
 


Mime
View raw message