About CGI Scripts

What is CGI used for?

The most popular use of cgi is for form processing, and 90% of your needs can be solved by the venerable formmail, which requires no CGI programming. All it takes is writing/designing an html form and using a couple required fields. For your normal needs, go ahead and use the formmail.pl script that is located inside the systemwide cgi-sys directory. If using formmail to process orders SECURELY, ask us to install formmail.pl inside your cgi-bin.

 

How should I upload my cgi scripts, ASCII or Binary?

Always upload your cgi scripts in ASCII mode.  That is the number one problem why cgi scripts don't work.

 

Where do I put my CGI scripts?

You should put your CGI scripts, not image or html files, into your cgi-bin directory. Your cgi-bin is found inside your www directory.  The full URL path would be
http://www.yourdomain.com/cgi-bin/file.name  Here's how a line inside your html file might look when calling the cgi script:
<form method="POST" action="/cgi-bin/file.name">

 

What is your server path to perl and sendmail?

Our server path to perl is /usr/local/bin/perl and sendmail is /usr/sbin/sendmail

 

How do I set permissions inside my cgi-bin?

If your script is getting an internal server error, you probably don't have the right permissions set for your script.  Telnet into your cgi-bin directory and do the following: chmod o+x file.name  This will give universal  execute permissions for that file. Or using WS_FTP, higlight the script and right-click. Then chmod--typically to 755 for cgi or pl scripts, and 777 for data files that visitors will be writing to.

Back to Main Support Page