Build Your Own Guestbook

by ladykathleen on February 21, 2012


This is a some-more modernized Web growth article. It requires that we be gentle with FTP and operative with your hosting provider. You also contingency have entrance to CGI in a cgi-bin office on your hosting provider.

Add a Guestbook in Your Own CGI Directory

If we don’t wish your Web site to be hosted remotely, and we have cgi-bin office entrance on your Web hosting server, we can horde your guestbook yourself.

Before we can implement and run a CGI on your Web server, we need to find out if your hosting provider allows CGI access. This information should be in the support information for your provider, or we can write to the support dialect of your provider. (Note: Most giveaway Web hosting services do not have CGI access.)

Most hosting providers that concede CGI entrance need that we place them in the cgi-bin directory. This office won’t be in the same office as your HTML. For example, your HTML might be stored in /home/username/html and your CGI scripts are stored in /home/username/cgi-bin. Make certain we know where your cgi-bin office is and that we have acces to it.

Once we have found your CGI directory, we need to find your CGI. There are many CGIs to select from, and I’m not going to explain how to implement a specific one. Rather, we will give instructions for installing any CGI on your Web site. A good place to find CGIs created in many opposite languages during the . There are over 50 to select from.

Steps to Install a CGI

Most CGI programs include of one or some-more files to implement on your Web server. For your specific CGI, we should follow the instructions in the implement file, readme or other support that is customarily enclosed with the module itself. However, following is some ubiquitous instructions for installing a CGI:

  1. Find the .pl or .cgi record and
  2. Put it in the cgi-bin directory
  3. Change the mode of the record (see below)
  4. Test the program

Changing the Mode of Your Guestbook

Most Web servers are Unix or Linux systems, and as such have dual customary modes for files executable and non-executable. All files are automatically uploaded as non-executable for security. What this fundamentally means is an executable record is a record that will do something when it is “run”. In sequence to tell the Web server that your CGI module can be run, we need to change it to be executable.

In sequence to change the mode on your CGI programs, we need to have an FTP customer that supports it or supports tradition commands. To make your CGIs executable, we need to send the tradition command:

SITE chmod 755 filename

With WS-FTP, we can right-click on the record we wish to change. Just make certain we select Execute in all 3 categories (owner, organisation and other). For other FTP clients, open a tradition authority line, and enter the authority above (change the filename to your filename).

Testing the Guestbook

Testing your CGI is critical before we tell the URL on your site. It can be really formidable to establish because a module is not operative rightly on a Web site. If we have problems, initial be certain to review all the assistance papers that come with your CGI. Always make certain that your CGI module is executable. Even if we know we altered the mode to executable, we will not harm it to change it again. If we have telnet access, we should try to run the CGI from the telnet authority line – this will mostly uncover we the errors that are sent to the blunder logs when the Web browser looks during it.

Previous Page
Page ,

Related Posts:

Previous post:

Next post: