Re: Premature end of script headers: cgi-bin .bat file problem with apache 2.0 on Win XP
- From: "Christopher F. Falzone" <ctiggerf@xxxxxxxxx>
- Date: 19 Dec 2005 07:34:07 -0800
Matija wrote:
> hello,
>
> I am trying to run a cgi-bin .bat file on an
> apache_2.0.55-win32-x86-no_ssl.msi on Win XP:
Huh? I'm not familiar with running batch files as cgi scripts.
>
> -- httpd.conf contains:
> ScriptAlias /cgi-bin/ "C:/HadocDoc_copie_COURANTE/cgi-bin/"
> <Directory "C:/HadocDoc_copie_COURANTE/cgi-bin">
> AllowOverride None
> Options ExecCGI # Options were None originally
> >
> AddHandler cgi-script .bat # not sure about this, none by default...
>
Sound's like stuff the apache group guys could decipher.
> -- it is called from HTML code:
> FORM action="/cgi-bin/AnalyseurHadoc.bat ..."
>
> -- and AnalyseurHadoc.bat starts some java code (outputting HTML):
> @echo off
> jre -cp C:\HadocDoc_copie_COURANTE\cgi-bin ... AnalyseurHadoc
>
Unless I'm way off here.... java is not cgi ... but I'm not sure.
> I get the following:
> on the web page with the FORM: Internal Server Error
> in the error.log: Premature end of script headers: AnalyseurHadoc.bat
Ahh ... something I recognize. This can mean a lot of things:
1. File permissions not set correctly ... make sure the file is
executable by all
2. Forgot to tell the script how to execute the code ... i.e. in perl
you need a #!/usr/bin/perl at the top of every page you want to execute
perl from. If java or batch files are cgi executables ... I'm sure you
need to tell it something similar.
3. Program errors ... make sure your script runs without errors from
the command line ... so if your program is program.bat make sure it
runs from the command line without errors before you try it in a web
browser.
4. See if there is anything else in the error logs ... usually the
message you got is accompanied by something else or some kind of error
code.
5. I'm sure there are more things that could be wrong here ... so I
put a 5 in just in case.
>
> the same Java code runs correctly on an older Apache 1.3-run Solaris,
> where the script file
> is a shell script.
Solaris=sun=java ... sometimes java will run fine on a Solaris machine
but not anything else .. You might want to check the version of java
you have and see if there are any differences compared to what you had
on the Solaris machine.
>
> any ideas?
I would find a good apache group and ask them how to get windows batch
files to run java as script files and how to setup the httpd.conf file
to do this.
I may be wrong here ... but when I think of cgi ... I think of perl ...
not batch files or java
>
>
> --
> PLEASE NOTE: comp.infosystems.www.authoring.cgi is a
> SELF-MODERATED newsgroup. aa.net and boutell.com are
> NOT the originators of the articles and are NOT responsible
> for their content.
>
> HOW TO POST to comp.infosystems.www.authoring.cgi:
> http://www.thinkspot.net/ciwac/howtopost.html
--
PLEASE NOTE: comp.infosystems.www.authoring.cgi is a
SELF-MODERATED newsgroup. aa.net and boutell.com are
NOT the originators of the articles and are NOT responsible
for their content.
HOW TO POST to comp.infosystems.www.authoring.cgi:
http://www.thinkspot.net/ciwac/howtopost.html
.
- References:
- Prev by Date: Re: running CGI from a subdomain
- Next by Date: Re: running CGI from a subdomain
- Previous by thread: Premature end of script headers: cgi-bin .bat file problem with apache 2.0 on Win XP
- Next by thread: running CGI from a subdomain
- Index(es):
Relevant Pages
|