Welcome to the Knowledge Base

  Articles
    A Simple PHP Template System
    Basic tips on optimizing for Google
    Beginner's web design tutorial
    The benefits of a Virtual Private Server (VPS)
    The myth of unlimited bandwidth
    VPS and reseller accounts compared
    What is CGI?
    What makes Digital Crocus different?

  Blogging Setup
    Setting up FTP hosting using Radio

  Disk and Bandwidth quota e-mails
    Bandwidth quota usage
    Disk quota usage

  Domains
    I've renewed, but my website's stopped working
    SSL secure website hosting
    Subdomains

  Dynamic Content (PHP and CGI)
    Uploading Perl CGI scripts
    Uploading PHP scripts
    Your own custom php.ini

  E-mail
    Creating mail boxes
    E-mail settings for other clients
    Outlook 2002 setup
    Outlook Express setup
    Setting up mailboxes
    Subscribe to your spam folder in Outlook 2002
    Subscribe to your spam folder in Outlook Express
    Subscribe to your spam folder in Thunderbird
    Thunderbird setup

  How to upload your website
    CuteFTP setup guide
    Internet Explorer setup guide
    Settings for clients not listed
    SmartFTP setup guide

  Troubleshooting
    I can't login to MySQL
    My domain name won't work
      I bought my domain name from a different registrar
      I bought my domain name through Digital Crocus

Uploading Perl CGI scripts

Perl CGI is fully supported on all Digital Crocus accounts within our secured virtual private server environment. In order to set up CGI scripts in the most secure way please follow these instructions.

  • CGI scripts do not need to be placed in a cgi-bin folder.

Many installation guides will say "upload this program into your cgi-bin folder". At Digital Crocus we do not restrict CGI to one folder, you may upload CGI scripts into any folder you like.

  • You must set the execute bit on CGI scripts (chmod +x), you should consult your FTP client documentation to learn how to do this.
  • Perl is located at /usr/bin/perl

This means the first line of your Perl scripts should be #!/usr/bin/perl. If your scripts are configured to use /usr/local/bin/perl, this will also work.

  • Sendmail is located at /usr/sbin/sendmail
  • CGI scripts run 'as you'.

When a CGI script executes, it has the same permissions you do when you login to the server. This means if you need to make a file or directory writable from your script you do not need to make it world writable (chmod 777), in fact it is a very good idea not to. If the installation instructions for your script tell you to make something world writable (chmod 777 or 666), you should omit this step.

  • Database connections are to 'localhost'

If your script needs to connect to MySQL, the server hostname you should use is 'localhost', this will usually be the default. You should login to MySQL as your main account username and with the password you defined via the databases section of the control panel. You will need to create at least one database (via the control panel) before you are able to login to MySQL.

  • Your error and suexec logs are your best debugging tool

Full server error and suexec logs are available to aid in resolving problems with your CGI scripts. If you are experiencing an unexplained error 500 (Internal server error) or are receiving blank pages from your CGI scripts, your log files should be your first port of call for problem solving. The error log will display many general script errors, the suexec log will display permissions problems that are preventing your scripts from executing. For any CGI problem, please consult both logs before contacting support.


Top ]


Questions Resellers Hosting Domains Home