Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Perl Beginners Cgi > Re: Premature e...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 6 of 11 Topic 1402 of 1496
Post > Topic >>

Re: Premature end of script headers

by drummike@[EMAIL PROTECTED] (Mike Williams) Jun 8, 2007 at 10:57 AM

------=_Part_41871_22816791.1181314652930
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

On 6/7/07, saravanan Jagadeesan <saran.jegan@[EMAIL PROTECTED]
> wrote:
>
> Mike,
>        These are the answers for your questions
>
>      Do you have other cgi programs in the same directory that work?
>
>          None works !!,Am having about 5 programs in my CGI-BIN folder
all
> these programs are executing the same error (500) including    hello
world
>
>          my web server is apache 2.2.4
>
>         These are the lines i found in my error-log
>
> [Thu Jun 07 11:27:17 2007] [error] [client 192.168.10.160] Premature end
> of script headers: hello.exe, referer: http://192.168.10.160/hello.html
>
>            by using this i checked for the header info in the program 
its
> ok
>
>            looking for your further suggestion to quit this problem


Saravanan,

Hi there.  Our conversation drifted off the list, I am replying back to
the
list so when this is resolved it will be in the archives and may help
someone else.  Also, I am hoping that someone else may be able to help.

Sounds like you have a server configuration problem.  I'm assuming that
you
are using some version of windows.  I am a bit out of my realm here, I use
apache on linux and do my cgi coding in perl.

Here are a couple of settings that are needed with linux, and perl cgi
programs from my /etc/httpd/conf/httpd.conf file:

ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"

#
# "/var/www/cgi-bin" should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
<Directory "/var/www/cgi-bin">
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
    Options ExecCGI
    AddHandler cgi-script .cgi
##mw - only a guess, but you probably need .exe instead of .cgi for the
Add-Handler line
</Directory>

The script alias and cgi-bin directory directives instruct apache to
execute
the cgi programs and direct the output to the client.  Without them it
will
simply try to send the contents of your exe file to the browser, which
would
result in the header error.

Mike

------=_Part_41871_22816791.1181314652930--
 




 11 Posts in Topic:
Premature end of script headers
saran.jegan@[EMAIL PROTEC  2007-06-05 12:07:32 
Re: Premature end of script headers
sdavis2@[EMAIL PROTECTED]  2007-06-05 09:07:49 
Re: Premature end of script headers
drummike@[EMAIL PROTECTED  2007-06-05 09:28:11 
Re: Premature end of script headers
vendion@[EMAIL PROTECTED]  2008-11-16 15:41:52 
what is the best / latest .CGI to handle safe form parsing?
lhernsen1015@[EMAIL PROTE  2008-11-17 20:04:39 
Re: Premature end of script headers
drummike@[EMAIL PROTECTED  2007-06-08 10:57:32 
Re: Premature end of script headers
drummike@[EMAIL PROTECTED  2007-06-12 10:54:01 
Re: Premature end of script headers
saran.jegan@[EMAIL PROTEC  2007-06-13 06:27:47 
Re: Premature end of script headers
saran.jegan@[EMAIL PROTEC  2007-06-13 09:41:14 
RE: Variable Name Survey Form Input
Hellman.Matthew@[EMAIL PR  2007-06-13 12:45:16 
Re: Premature end of script headers
drummike@[EMAIL PROTECTED  2007-06-13 13:04:08 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Nov 22 11:05:13 CST 2008.