GetDotted Domains

Freeola Guides

 

CGI Essentials

Last updated on by Freeola Support

2 out of 2 people found this article useful.

Welcome to the Freeola Internet customer support pages. This guide is designed to give general information about CGI scripting. For more internet help topics please visit our main Support Page.

Modern web development has largely moved away from CGI in favour of more efficient and scalable server-side scripting technologies like PHP. As such, this guide will no longer be updated, but will remain for reference purposes.

CGI stands for Common Gateway Interface. It allows you to run a script on the Freeola Hosting Servers which can perform tasks that are not available in HTML. For example, hit counters, guestbooks and random image displays to name but a few.

CGI scripts are simply text or ASCII files which are 'compiled on the fly' (interpreted by a program on the server rather than the browser) by the Perl interpreter. They can be edited or created on any text editor and must be saved with a .cgi file extension.

To run a script on the Freeola Server there are a few configuration settings for your script which must be changed or added inside the script.

VIP+ & MySQL Web Hosting

There are a few changes to the below information for customers using a legacy VIP Web Hosting service from Freeola.:

Full Server Path To Web Space Root Directory

The full path to your web space root for VIP customers is simply /httpd/

Full Server Path To CGI Directory

Similar to above, the path to the CGI directory is /httpd/cgi-bin/

Uploading CGI Scripts

CGI scripts must be placed within your cgi-bin directory in your web space account, otherwise it will not work. The file MUST be transferred in 'Text' or 'ASCII' mode and NOT in 'Automatic' or 'Binary' mode.

Legacy Hosting

Path To Perl: #!/usr/bin/perl

This must be on the VERY first line or the script will not work.

Some or all of the following settings may be required by your script. If you have downloaded a third party script there may be comments within the script to tell you where to place them. Instructions could also be within any text files which accompany the script.

Path To Sendmail: /usr/sbin/sendmail

For sending e-mail from your script.

Full Server Path To Web Space Root Directory

This depends on your Freeola User Name, the last 2 numbers form part of the path.

For example, if your webspace was 'sr0011223' the path is /freeola/users/3/2/sr0011223. Similarly, for 'sr0024658' the path is /freeola/users/8/5/sr0024658).

Full Server Path To CGI Directory

As the with the server path to web space above, this is based on your Freeola User Name.

E.g. For 'sr0011223' the path is /freeola/users/3/2/sr0011223/cgi-shl/. For 'sr0024658' the path is /freeola/users/8/5/sr0024658/cgi-shl/.

Full URL For Web Space

Your web address as viewed by a browser (e.g. www.freeola.com).

Full URL To CGI Script

Your web address with '/cgi-bin/' added to the end. For example, www.freeola.com/cgi-bin/ .

Full URL To Temporary File

This is probably the directory you wish to send information from your script to and would be your web address plus a temporary file name - www.freeola.com/tempfile/ to continue with the above examples.

E-Mail Address

The e-mail address which you would like your script to send e-mails to.

The '@' symbol in the e-mail address should be preceded by a '\' symbol. For example, '[email protected]' would be support\@freeola.com.

This is only required if you are setting an email address in the script itself.

Uploading CGI Scripts

CGI scripts must be placed within your cgi-shl directory in your web space account, otherwise it will not work. The file MUST be transferred in 'Text' or 'ASCII' mode and NOT in 'Automatic' or 'Binary' mode.


Now that your script is on the server you need to set the 'Permissions' for the script using your FTP software, this is the way that you open access to the script for people accessing the website. Take care with this procedure as setting the wrong permissions can deny even you access to the script.

In your FTP software there should be a link for 'Set Permissions' or CHMOD (if you cannot find this link you may have to use a different FTP program).

ALL scripts in the cgi-shl directory should be set to CHMOD 755.

If your script outputs information, or creates a file or a web page, the file or page must be stored in a sub-directory of the htdocs directory. Create this sub-directory using your FTP software, then using CHMOD again set permissions for the directory and any file within it to 777.


Did you find this article helpful?


Freeola & GetDotted are rated Five stars

Check out some of our customer reviews below:

View More Freeola Reviews

Need some help? Give us a call on 01376 55 60 60

Go to Support Centre
Feedback Close Feedback

It appears you are using an old browser, as such, some parts of the Freeola and Getdotted site will not work as intended. Using the latest version of your browser, or another browser such as Google Chrome, Mozilla Firefox, Edge, or Opera will provide a better, safer browsing experience for you.