I spent some time getting this to work with the beta1 release, and it seems to be working fine now.

Issues:
1) Drupal uses session_name which is not at all PHPSESSID, instead it is an MD5 hash of the base drupal URL

2) WebCalendar 1,14 main class seems to have a bug on line 568 (unless i seriously misunderstand it). The following fixes it:
///////////// includes/classes/WebCalendar.class //////////////////////
// Use another application's authentication.
if ( ! $login = user_logged_in () ) { //Used to say: $login != user_logged_in ()
//echo "Setting to not found";
$session_not_found = true;
}
////////////////////////////////////////////////////////////////////////////
Without this modification you get a redirection loop once you get everything else to work.
Interestingly, 1.12 had it correctly.

3) Because the session_name is based on the current drupal URL, so far I can only get it to work by configuring drupal with cookie_domain set to your domain. This way drupal code uses the domain you provided and not the the current URL.

So, in drupals' sites/default/settings.php, set
$cookie_domain = 'yourdomain';
If you need to be domain-agnostic, you'll have to figure out how to fix this up better than I did.

4) Attached is the change to user-app-drupal.php
Instead of assuming that the session cookie is named PHPSESSID (which it is not for drupal, at least, not on my machine, drupal 5.2),
it sources drupal libraries to determine the name of the session cookie.

Comments

akom’s picture

StatusFileSize
new1.2 KB

Upon further testing, there is at least one problem with this - drupal wants the session handler to be user, and webcalendar wants it to be files.
My hack causes the webcalendar ini_set's to get executed, so I amended the patch to revert session.save_handler value back.
Now the Administration screens work again in WebCalendar.

crudolphy’s picture

Thanks for your work on this. I am using Drupal 5.2 and WebCal 5.1.x-dev and WebCalendar 1.1.4. Prior to fix I would click on Calendar Link and would get an infinite loop, the Calendar page would render with Heading but no actual calendar in iframe. It would continually loop through waiting for server to done without ever stopping.

I applied your patch to user-app-drupal and the other changes and it works like a champ. I haven't got much setup in WebCalendar in terms of events and the like, but I did test all of my logins that are restricted to certain roles and things seem to be working well.

zaphodbb’s picture

I would also like to extend my thanks. After struggling with this for a while, I finally found your note. I now have this working with WebCalendar 1.1.6 and WebCal 5.1.x-dev on Drupal 5.3 on an Ubuntu server (7.04).

I use both Firefox and Safari. Firefox loads easily. Safari loads except for the last item which takes several seconds before it finishes.

edoc’s picture

Anyone using 1.16 successfully?

I have it working except that repeat events are written yet the days to which they are written are not highlighted - so a viewer of the calendar won't know to view those dates for an event.

http://firstbaptistchurchsh.com/modules/webcalendar/month.php

WDYT?

Thanks!

wiredescape’s picture

WebCalendar 1.1.6 working with Drupal 5.7

still needs work but webCalendar working correctly so far.

See 176815#comment-768850

HTH,
Doug

crudolphy’s picture

Status: Needs review » Closed (fixed)