PHP iCalendar

I have reviewed the two other meaty threads ( 1, 2) on the subject of configuring PHP iCalendar, but I have not had much success.

I am using a shared hosting account. I tranferred all of the files in the .zip to The enabled webDAV and password protection on the ‘ical’ directory. I am trying to run PHP iCalendar 2.0 beta.

Using the default, loads successfully. I run into trouble when I try to enable user login (so that the admin area becomes accessible and private calendars can be unlocked.)

These are the lines I have changed in the config:

$cookie_uri ='; $download_uri ='; $default_path = ''; $allow_login = 'yes'; $ftp_server = ''; $ftp_calendar_path = '/home/my_username/';
Everything else is default.

Browsing gives the following message: [color=#CC0000]

There was an error!

The calendar “all_calendars_combined971” was being processed when this error occurred.

Please use the “Back” button to return. [/color]

P.S. I know there are a few single quotes ( ’ ) missing from the strings above, but that is an error in my post only, not the config itself.

Can I provide any additional information that will help people help me?

how are you publishing the icalendars? i usually have gotten that message when the calendar file on the server is not in the correct format and it has errors parsing.

I am using using Mozilla’s Calendar extension for Firefox. I have PHP as CGI. I can see my calendars just fine when using an unedited config file. Once I start editing the paths (so a user can login to edit preferences), then I get the above error. I don’t think PHP iCalendar is having trouble parsing the file due to any problem with the .ics file itself. There is something funny about configuring for Dreamhost that I am just not getting.

I am trying to use FTP authentication, but I also tried turning off webdav, using internal authentication, and publishing with the included publish.ical.php script. No luck with that either.

I don’t care which method I have to use. Either is fine, but, obviously, I still need help.

Has anyone got this working? Would you please post step-by-step instructions?


I have read all of the threads and have fiddled with this for a few hours now. I am no web expert and a PHP novice, but I normally can figure things out.

I am using iCal to publish my .ics files and I can’t get PHPiCalendar to work. Does anyone have it working?

I am about to give up and go back to publishing my calendars to .Mac, but that is such a waste…


I have the following setup. It works. :slight_smile:

On Mac OS X side: I publish my calendar files into WebDAV directory, iCal automatically does this for me after setting it up.

I have PHP iCalendar installed in my web site, it is set to use my calendars from the WebDAV location using HTTP (list_webcals under in PHP iCalendar). PHP iCalendar version is 2.0beta and I didn’t have to do much configuration.

  • miikka

I have it working with both WebDAV and publish.ical.php. Which do you want to use? In order to use WebDAV, you MUST run PHP as an Apache module. WebDAV sets the owner and group to dhapache (I think thats the name) and no other user has permissions. When you run PHP as a CGI, it runs as your username, and has no permission to the WebDAV folder.

If you want to use the publish.ical.php script, there are a few modifications that have to be made, but it does work.

I prefer the CGI method, as I can actually work with the files via SSH, and I have more “control” over things.

Pick a method, and I will send my configs.


I am open to whichever you think is easiest. If I choose to run PHP as an Apache module, am I limiting myself?

I read that if I want to install one of the “One click modules” that I need to run PHP as a CGI.

I am interested in installing a couple of the one click modules, so I imagine that I need to run PHP as a CGI.

Can you help me with the set up?


Thank-you for your reply shor0814!

Would it be too much to ask that you post both configs? Lots of people read these boards and some may want one, and some the other.

If I have to choose one, I’ll go with with the “PHP running as CGI” solution.


Yes, I agree. I would like the PHP as a CGI solution as well. Posting your steps to this thread will help many others.

Could you walk us through your setup and not just the config file? I have a few basic questions as well, like…

  • Where do I put the PHP files?

I assume I can put them anywhere (I remember reading that in the DH Knowledge base). I have the “phpicalendar-2.0b” folder in the top level of my website folder.

  • Do I need to publish my calendars to the phpicalendar “calendars” folder?

I assume no, as long as I have the correct path in the config file.

  • When I publish my calendar and have phpicalendar set-up correctly, what URL do I use to view the calendar?

I am a PHP novice, so I need hand holding!

Than you for any help you can give all of us.


Okay, after messing around for quite a while, I got it to work!

I publish from iCal via the publish.ical.php link.

I have published a public calendar. Next I will try to publish private calendars.

Here is what I did…

I wanted my public calendars to be in a folder called “public-calendars” (I did NOT enable WebDAV on this folder)

  1. I created my public-calendars folder at the top level of my website folder (although it can be anywhere in your website folder).

  2. I expanded the phpicalendar-2.0b file I downloaded.

  3. I put the contents of the phpicalendar-2.0b folder into my “public-calendars” folder

  4. On my Mac, I opened iCal and created my public-calendar

  5. I published the calendar using (and entered my username and password)

  6. I modified the in my public-calendars folder. Here are the important bits:

$cookie_uri = ‘’;

$download_uri = ‘’;

$default_path = ‘’;

$phpicalendar_publishing = ‘1’; (you need this if you are not using WebDAV)

There are other setting you may want to play around with, but the above variables are what you need to get up and running.

  1. To access my calendar I go to:

This should make it work. I’ll be happy to try and help anyone who needs it, but like I said above, I am only a PHP novice.

FYI, I also deleted the other .ics files in the calendars folder (home.ics, work.ics, etc.) so there would not be any clutter.


Thank you very much for your walk-through, wtbates!
Unfortunately, this still isn’t working for me.

When I use

I get an error message telling me it can’t find the .ics file.
What should that path look like when complete?

At the moment, I am using:

This allows me to download my calendars, but publishing doesn’t work. It seems to work but it doesn’t, which is to say that the little rotating arrows appear next to the calendar indicating that it is being published, but when I re-download the calendar (or view any changes I have made are lost!

Also, enabling login ($allow_login = ‘yes’:wink: in the, generates a mess of PHP errors. screenshot .

Please help!