I just tried my first Perl script. it’s called index.cgi and the code is:
print “Hello world!\n”;
I get a 500 Server error. Any help?
Kill exit; and make sure to: chmod 755 index.cgi
Don’t use exit unless you have to exit prematurely.
yerba# rm -rf /etc
As well as making your script executable (as mentioned by guice), you also need to print an HTTP header telling the browser what type of content it’s about to receive. So, before your first print statement, put:
oh yah! oops…been too long since I’ve written CGI scripts. lol
Thanks for the tips. It works now