left header graphic
The Network People Banner
right header graphic
   
hi
Previous:
How I use .mac
home : computing : mac : tips : idisk :
PHP iCalendar
next:
Tethering an A900 with a PowerBook

Getting PHP iCalendar to publish iCal calendars

To get PHP iCalendar to work I did two things. The first was requiring HTTP authentication to view calendars. This is arguably something that should be done anyway. I did so by updating the following block of code in httpd.conf:

  • <Directory "/usr/local/www/phpicalendar">
    • Options Indexes ExecCGI
    • AllowOverride Limit
    • Order deny,allow
    • deny from all
    • AuthType Digest
    • AuthName iTools
    • AuthDigestDomain "/"
    • AuthDigestFile /home/idisk/WebDavUsers
    • require valid-user
    • satisfy any
  • </Directory>
  • Now when I visit my iCal site, I have to authenticate using my webdav credentials. The last little tidbit was getting PHP iCalendar to know where to find my calendar files. I added the following little code snippet to config.inc.php, immediately after the $calendar_path declaration:

  • if (isset($_SERVER['REMOTE_USER'])) {
    • $calendar_path = "/home/idisk/".$_SERVER['REMOTE_USER']."/Sites/.calendars";
  • }
  • If I haven't passed HTTP authentication credentials, I get the normal icalendar behavior. If I authenticate, my published calendars are displayed. The only remaining anomoly is that the publish URL that iCal shows is on the ical.mac.com server. Obviously, I'd need to point ical.mac.com to my server, or just re-write the URL to point to my server. The latter requires less effort.


Previous:
How I use .mac
home : computing : mac : tips : idisk :
PHP iCalendar
next:
Tethering an A900 with a PowerBook

Last modified on 7/11/05.