Koozali.org: home of the SME Server

CGI Scripts

sdphm80

CGI Scripts
« on: May 14, 2004, 09:58:18 PM »
I'm trying to run CGI scripts but I just can't quite get them to run. I've enabled CGI script execution in the web manager. Below is the simple CGI scipt that I have. It is as if the web-server can't find perl to run the scripd.

#!/usr/bin/perl
print "HELLO WORLD";
exit (0);

When I check the error log I see the following message.

[Fri May 14 09:07:21 2004] [error] (2)No such file or directory: exec of /home/e-smith/files/ibays/sfspots/cgi-bin/test.cgi failed

[Fri May 14 09:07:21 2004] [error] [client 192.168.1.100] Premature end of script headers: /home/e-smith/files/ibays/sfspots/cgi-bin/test.cgi

Any help would be greatly appreciated!

Thanks

bob

CGI Scripts
« Reply #1 on: May 15, 2004, 12:22:32 AM »
how did you upload the scripts? You need to use ftp, and set it to ascii mode. What did you chmod the script to? Check the documentation to see what it requires.

Offline Reinhold

  • *
  • 517
  • +0/-0
    • http://127.0.0.1
CGI Scripts
« Reply #2 on: May 15, 2004, 08:51:28 AM »
sdphm

Set correct rights to your test.cgi i.e. 711 seems to be appropriate...

- If you are a newbie to Linux please read about "chmod"
(plus read the relevant chapter in our ftp software manual)...remember you want to EXECUTE this .-)

Reinhold
............