Uploading and running CGI scripts

You can upload and run CGI scripts to make your site interact with databases and other applications.

To upload and run a CGI script:

  1. Write or obtain the CGI script.

  1. Copy the script to the CGI directory on your site. If you are unsure of the name of your CGI directory, check the Configuration page. You can derive your CGI directory name from the Script Alias listed on the Configuration page. For example, if your Script Alias is cgi-bin, then your CGI directory name is /var/www/cgi-bin.

  2. Important: If you are on a Microsoft Windows system, you need to upload CGI scripts to your site through an FTP connection instead of through the File Manager. Further, when you upload through FTP, upload files as ASCII, so that hidden characters inserted into the CGI script by Windows are translated correctly. If these characters are not translated correctly, the CGI scripts do not work.

    If you are on a Linux system, you can upload CGI scripts to your site through the File Manager. Linux does not add hidden characters to files, so no translation is needed.

  1. Change the CGI script file permissions to the following settings:

  1. Open your Internet browser and in the Address field, enter the following URL:

http:// <web_server_name>/<script alias>/<script name>

Your CGI script runs. The results appear in the browser window.

Related Topics