On 6/7/07, saravanan Jagadeesan <[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

Reply via email to