Account Manager
 

CGI-Bin Applications

CGI — Common Gateway Interface — are computer programs running on the Web server that can be invoked from a page in a browser.

The CGI Center is a great resource with many options to install and utilize a multitude of CGI scripts. Click on the link corresponding to the script. The script will be automatically installed in the “cgi-bin” in your disk space for your domain name on our server.

Beyond keeping our servers up-to-date and the information we have placed on these Hosting Manual and Tutorial pages, we do not provide free Technical Support for CGI scripts. If you would like Merlyn's help with a script, please e-mail . Technical support of this nature is $30.00/hr. with an hour minimum. It is well worth it.


Simple CGI Wrapper

Simple CGI Wrapper will create a cgi-bin at the public_html level of the hosting account, allow a user to run scripts with their own user id.

Random HTML

The Random HTML generator will pick a string of HTML from a list and insert it into a SSI enabled Web page.

Simple Guestbook

The Simple Guestbook is a script that may be used on a Web site.

Advanced Guestbook

Another guestbook script, but with many more options. This script is written in PHP and MySQL.

Counter

This script may be used as a visitor counter for a Web page.

Clock

This script will create a java clock for use on the Web site.

Countdown

This countdown script will countdown to a specific date set by the user.

CGI E-mail

CGI E=mail will take the output from any HTML form and convert it to an e-mail format. For a detailed guide on using CGI E-mail please check this knowledgebase.

Entropy Search

This script may be used to create a simple search engine for a Web site. For a detailed guide on installing Entropy Search please check this knowledgebase.

Entropy Banner

This script will create a banner rotator for Web page. This script is particularly useful for Web sites generating additional revenue by displaying advertisers' banners. For a detailed guide on setting up Entropy Banner please check this knowledgebase.

A Few Important Points

1. The pre-installed scripts that come with cPanel are very easy to setup and use. There are however many more scripts available on the Web, many of them are free.

2. Most scripts will come with documentation or “Read Me” files explaining how to setup and utilize the script correctly.

3. Most scripts need to be CHMOD to 755 in order to work correctly, unless otherwise stated in the scripts’ documentation.

4. Many scripts will need to be modified to include the path of Perl and, in small cases, sendmail. This information can be found on the front page of cPanel.

Where to Put CGI-Bin Scripts

Put your cgi-bin scripts in the www subdirectory named "cgi-bin".
Paths to Date, Mail, Perl, etc.

Below are the 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/ --root for the hosting account
Domain directory: /home/username/domainname-www --the www directory
Cgi-bin path: /home/username/domainname-www/cgi-bin/filename

Do not include domain extension when listing domain name.

Setting Permissions

Change permissions in Control Panel.

Click on File Manager.

Click on the file. New information will appear in the upper right-hand frame.

Click on the "Change Permissions" link and a set of boxes will appear.

Permissions:
r = read access
x = execute access
w = write access

Permissions may also be changed from the FTP client.

In Fetch, click on the file to change and highlight it.

Under the Remote menu, select "Change Permissions." A window will pop up showing the current permissions for the file highlighted. Click on the boxes to change permissions as needed.

WS_FTP accomplishes the same task. Highlight the file and right-click on it.

A menu will pop up. Select "CHMOD."

Make selections in this window.

Troubleshooting CGI-Bin Problems

Below are solutions to a couple of the more common CGI script problems:

  • "Internal Server Error. The server encountered an internal error or mis-configuration and was unable to complete your request."--Generally caused by a problem within the script.
  • "POST not implemented." —Using the wrong reference for cgiemail. Use the reference /cgi-bin/cgiemail/mail.txt. This error message could also indicate that the script is not in cgi-bin directory. Note that files that start with a "." are hidden files. To see them, type ls -al. To FTP this file in, go to the home/yourdomain directory.

For more information about setting up CGI E-mail, please check this knowledgebase.



Was this answer helpful?

Add to Favourites Add to Favourites

Print this Article Print this Article

Also Read
Subdomains (Views: 372)
File Manager Guide (Views: 395)
FormMail (Views: 411)

Powered by WHMCompleteSolution