SRO Hosting - Premium web hosting services  FAQ - Using CGI scripts

  How do I use CGI scripts?
Simply upload the script to your cgi-bin directory, then call it from a link or form, like:

<a href=http://www.mydomain.com/cgi-bin/myscript.pl>My script</a>
  or
<form name=myform action=http://www.mydomain.com/cgi-bin/myscript.pl method=POST>
  • You need to change script permissions after uploading to make it executable. To do this, use your FTP program "chmod" option to make the script 'executable' or '+x'.

  • Perl scripts have a line at the top which needs to point to the server's perl directory. For our servers, that path should read /usr/bin/perl.

  • The full system path to a file will usually begin with /home/[your account]/.

  • If your script needs to write files, you must set file or directory permissions to allow this. Use your FTP program "chmod" option to set 'writable' or '+w' permissions.
To test CGI or use common scripts, we've included a few to get you started. You can find them (and instructions) in your cgi-bin directory.   If you have trouble, feel free to contact us but note we can only ensure your account supports CGI.   We will not debug issues with uploaded scripts, so consult the script documentation before requesting support.

See also: Form Mail quickstart
Back
  Copyright 2011 SRO Hosting