Running a script from a web page

Jonathan hutchins at opus1.com
Fri Jun 8 01:49:44 CDT 2001


Thanks, Glen!
However:

> If you put this:
 
> #!/bin/sh
> echo "Content-Type: text/html"
> echo ""
> echo "testing"
> 
> in a file called 'shellcgi.cgi' in your cgi-bin directory, 
> then 'chmod a+x shellcgi.cgi' (also in that directory), you should be able
to 
> go to the appropriate URL 
> (http://www.yourdomain.com/cgi-bin/shellcgi.cgi) and see the
> output "testing".

What I get (in the error log) is:

[Thu Jun  7 20:47:50 2001] [error] (8)Exec format error: exec of
/var/www/cgi-bi
n/shellcgi.cgi failed
[Thu Jun  7 20:47:50 2001] [error] [client 192.168.76.3] Premature end of
script
 headers: /var/www/cgi-bin/shell.cgi

But I'm sure I'm closer than I was!




More information about the Kclug mailing list