PHP icalendar Google Calendar and PHP icalendar MRBS Room booking Calendar  

Setting up PHPiCalendar on

Below are directions for using SFU's Fraser server to parse ical and sunbird calendar files. Additional help for php icalendar is available from and My directions are for Macintosh OS X but can easily be modified for any connection to Fraser. These work for me but I do not guarantee that they will work for you, or that they will meet your security needs.

A) Open a Terminal window and SSH to your SFU UNIX account (fraser). Follow ACS instructions for creating a secure server at, I have the basic information below with additional information helpful for php icalendar.

mkdir sec_html
chmod 711 sec_html
cd sec_html
mkdir biology
(or whatever you want your directory to be called)

B) Download and extract phpicalendar on your computer.

C) Connect to afp:// (with OS X) or

D) Open the directory you created (sec_html/whatever) and transfer the extracted files. Use TextWrangler to open and modify files:

E1) A new first line of program files needs to be added to 12 .php files:

[Do not add it to or error.php]



E2) Modify

  1. Add /tmp to $tmp_dir
    $tmp_dir = '/tmp';
  2. Change save_parsed_cals to no if you need instantly updated information in your calendar
    $save_parsed_cals = 'no';
  3. Turn off RSS (I have not had time to get it to work. If you use Google Calendar people should get their RSS feed directly from Google)
    $enable_rss = no;

F) Change permissions for directories and files- search/replace YOURACCOUNT & biology in the 22 lines of commands below, then you may copy and paste them all at once in your terminal window

chmod 711 /home/YOURACCOUNT/sec_html/biology
chmod 711 /home/YOURACCOUNT/sec_html/biology/rss
chmod 711 /home/YOURACCOUNT/sec_html/biology/includes
chmod 711 /home/YOURACCOUNT/sec_html/biology/admin
chmod 711 /home/YOURACCOUNT/sec_html/biology/images
chmod 711 /home/YOURACCOUNT/sec_html/biology/languages
chmod 711 /home/YOURACCOUNT/sec_html/biology/calendars
chmod 711 /home/YOURACCOUNT/sec_html/biology/templates
chmod 711 /home/YOURACCOUNT/sec_html/biology/templates/default
chmod 711 /home/YOURACCOUNT/sec_html/biology/templates/default/images
chmod 711 /home/YOURACCOUNT/sec_html/biology/functions
chmod 700 /home/YOURACCOUNT/sec_html/biology/*.php
chmod 700 /home/YOURACCOUNT/sec_html/biology/rss/*.php
chmod 700 /home/YOURACCOUNT/sec_html/biology/includes/*.php
chmod 700 /home/YOURACCOUNT/sec_html/biology/admin/*.php
chmod 700 /home/YOURACCOUNT/sec_html/biology/languages/*.php
chmod 700 /home/YOURACCOUNT/sec_html/biology/calendars/*.php
chmod 700 /home/YOURACCOUNT/sec_html/biology/functions/*.php
chmod 644 /home/YOURACCOUNT/sec_html/biology/images/*.gif
chmod 644 /home/YOURACCOUNT/sec_html/biology/calendars/*.ics
chmod 644 /home/YOURACCOUNT/sec_html/biology/templates/default/*.*
chmod 644 /home/YOURACCOUNT/sec_html/biology/templates/default/images/*.gif

G) Now you should be able to go to a web browser and view the included calendars-

H) I replace the calendars in the calendar folder with a small calendar file (such as Canadian holidays or a Lunar calendar) as Fraser does not support webdav (and iCal/Sunbird do not do FTP). [I have not got it to work with only web calendars, but I have blacklisted the single file successfully ($blacklisted_cals[]]

I) You may automatically publish your iCal or Sunbird calendar(s) to your SFU webdav space and place a link to it in

J) You may create a link to your Google calendar- as of August 2006 you must modify the ical_parser.php file to show duration of repeating events. Directions are at