views:

156

answers:

1

Hi,

I am trying to implement single sign on between an existing Drupal site a Kohana 3 based webapp. Ideally I would like to load Drupal's session information into $GLOBALS using the bootstap:

require_once('../includes/bootstrap.inc');
drupal_bootstrap(DRUPAL_BOOTSTRAP_SESSION);

A post on the Kohana forum suggested that this should be placed in Kohana's index.php, but didn't say where. I've tried right at the start, and just before Kohana's own bootstrap, but both result in a White Screen of Death.

Changing the bootstrap level to DRUPAL_BOOTSTRAP_CONFIGURATION works, but the session data isn't loaded. Any bootstrap level above DRUPAL_BOOTSTRAP_ACCESS results in a WSOD.

If anyone has any ideas I'd really appreciate it!

A: 

Chances are you need to do a chdir() to the Drupal directory before you try to bootstrap it.
You can see a nice explanation that would most probably work on Kohana as well here.

Omer