CGI Calendar Support This Project
Version 3.0 - updated from version 2.8 on March 13, 2007
Licensed under version 2 of the GNU General Public License.

Installing CGI Calendar

(please read all instructions before beginning your installation):

Note that there have been some improvements made around the way you install CGI Calendar as of version 2.5. Please read these instructions if you're used to previous versions!

Setting up CGI Calendar is not that hard, but you can't be afraid to open a Perl script in a text editor to change the value of a few variables. Don't worry…I'll walk you through it.

System Requirements

Notes on uploading: If you upload the .tar.gz file to your web server and then unzip/untar the file on your webserver, use BINARY mode to FTP the file. This is the recommended method for transferring the files. If, however, you unzip and untar the file locally and then upload the .cgi, .pm, and other files individually, make sure you upload them using ASCII mode. If you upload the individual files in BINARY mode, you may get an error when you try to run CGI Calendar.

  1. (Usually not needed) In each perl file, that is,,,,, index.cgi, viewday.cgi, editevent.cgi, and addevent.cgi, change the first line to indicate the correct path to perl on your server. The most common location is /usr/bin/perl, and this is how the line currently reads in all the files. If this is where perl is on your server, you need not change the lines. If, however, perl is at a different location,
    for example, change the lines to look exactly like this:
    The same idea applies to all systems. If you're on Windows and perl is at
    then the line would read
    #!C:\\Perl\\Perl.exe (note the double \'s)
    or an example on a Macintosh (Classic OS) might be
    #!Macintosh HD:Perl Folder:Perl
    So, in general, the first line of each perl file must look like this:
    #!(path to perl)
  2. If your server is configured like mine, you can't serve up images or stylesheets from the cgi-bin directory. That means you'll have to move add.gif, delete.gif, edit.gif, and calendar.css to some other location on your web server (anywhere you have HTML web pages saved should suffice).
  3. In, you'll need to set the values of some variables to match your server. Among the configuration values are the name of your server, the URLs for add.gif, delete.gif, edit.gif, and calendar.css. Read the comments in for instructions on how to do that. You also set the default language for the calendar in US English is the shipped default. Any language defined in can be set as the default. You must change the web administration password in for CGI Calendar to work, even if you do not intend on using the web-based administration features.
  4. Make sure that you have the correct permissions set on all the files, specifically
    • world read and execute access on all .cgi and .pm files
      (on Unix that would be chmod a+rx)
    • world read access on all .html files
      (on Unix that would be chmod a+r)
    • world read and write access on all .db files
      (on Unix that would be chmod a+rw)
  5. Modify top.html and bot.html to make the calendar look like the page on your site. You will want the calendar to look like the pages on your website.
  6. (optional) CGI Calendar now uses a Cascading Style Sheet to determine the colors used, the font faces used, and the size of the calendar date cells. This style sheet is called calendar.css. You moved it to some location on your web server in step 2. Feel free to modify the style sheet to make the calendar look more like your website.
  7. (optional) If you would like to prevent random people from adding and deleting events from your calendar, then you need to use your web server's built in authentication procedures. For most of us, that means using HTTP Basic Authentication. This is most often implemented by using a .htaccess file that limits access to the addevent directory to valid users found in a password file. For more information on setting this up, please consult your system administrator.
  8. (optional) If you would like to use a different default language than English, in, set the value of the $value{"defaultLanguage"} variable to another language code. The language codes are defined in US English is "en-us", Brazillian Portuguese is "pt-br", German is "de", etc.

That's it! You've set up CGI Calendar to run on your server!

If it doesn't work: