csh cgi script gives malformed header
I am using apache 2.0.47 on HP-UX 11.0.
I am trying to run a simple csh unix script as a cgi in the
ScriptAlias directory /apache2.0.47/cgi-bin
When it runs I get this in the error_log:
[Wed Nov 05 11:58:06 2003] [error] malformed header from script. Bad
header html>: simple.csh
The script is very simple and contains:
#!/bin/csh
echo "Content-type: text/html"
echo
echo "<html><body>"
echo "<BLOCKQUOTE><PRE>"
env
echo "</PRE></BLOCKQUOTE>"
echo "</body></html>"
File permissions etc have all been checked.
Change the first line to #!/bin/sh and magic it works!
Perl scripts work fine too.
Curious to know why mod_cgi is treating csh differently?
|