Using CGI
programming:
CGI stands for "Common Gateway Interface," or computer programs
running on the web server that can be invoked from a www page through
a web browser.
CGI scripts need to be saved in ASCII
format and uploaded to your server's cgi-bin in ASCII format.
This page provides you with information needed when configuring
scripts and other information regarding your CGI-bin.
Put your cgi-bin scripts in the public_html
subdirectory named "cgi-bin".
Here are your paths to the common server resources that CGI scripts
often require:
- Date: /bin/date
- Sendmail: /usr/lib/sendmail
- Perl5: #!/usr/bin/perl
- Serverpath:
/home/username/domain-www/cgi-bin
- Root path: /home/username/
(puts you in your the root of your account)
- Domain directory: /home/username/public_html
(puts you in your public_html directory)
- Cgi-bin path: /home/username/public_html/cgi-bin/filename
(puts you in your cgi-bin)
NOTE:
Do not include domain extension (.com)
anywhere you list your domain name in the cgi paths.
Perl Modules:
Our servers come ready to run most Perl scripts. Most scripts
require specific modules to be installed on the server.
Please check our module list to make sure the ones you need are
there. If they are not present on the server we can (in most cases)
install them for you for free.
The path to Perl:
One of the first things you must do when configuring a script, is set
the correct path to the Perl interpreter, which is the engine
responsible for processing the script.
The path to Perl on our servers is:
#!/usr/bin/perl
The path to Sendmail:
Some programs such as the ones, which send email will need to know
where the Sendmail program resides on the server. The script will
typically have a setting like this: $mailprog = '/usr/sbin/sendmail';
and will want you to set it appropriately.
Sendmail on our servers can be found here:
/usr/sbin/sendmail
and
/usr/lib/sendmail.