Synchronization of Drupal 5.9 and PHPBB 2.x - Single-Sign-on does not work

Events happening in the community are now at Drupal community events on www.drupal.org.
eigentor's picture

I am trying to join www.myrockinspace.com/cms and www.rockabilly-forum.de. It is Drupal 5 and PHPBB 2.x. Everything works, apart from the single-sign-on.
I am suspecting some cookie issue.

After an Analysis of the module and the cookies PHPBB sets, I think there should be two cookies:
one named mycookiename_data, and one named mycookiename_sid. (my cookie name is php2rockabilly)

What strikes me, is the _sid one is missing. I only have php2rockabilly_data

Also the format of "Content" of phptorockabilly_data is weird: Firefox shows me the
following: http://www.flickr.com/photos/14250508@N02/3146595525/sizes/o/

Trying to analyze it more, I intercepted the cookie before it gets sent to the browser
by doing a print_r ($_COOKIE). this gave me the following:
http://pastebin.com/m410f3ebb

I guess those are the functions that create the cookies:
http://pastebin.com/m32eabcf5
http://pastebin.com/m6ee2bb2b

About the strange encoding: I already suspected my database encoding might be a problem,
because the phpbb database has latin_1_swedish as collation.

I also had a look at how the cookie looks that phpbb sets, and this looks totally
different, but this might be normal:
http://www.flickr.com/photos/14250508@N02/3146739067/sizes/o/
http://www.flickr.com/photos/14250508@N02/3147573668/

So how can I get to this problem?

Comments

Server issue

eigentor's picture

Really strange - I got it working effortlessly on my local machine, using the same database. Only difference is on the online setup I merged the two databases into one and on the local setup they are separate. Gonna try this on the online version, too.

What I can definitely say - one mustn't set a cookie Domain in PHPBB - this prevents the cookies from being set in the right way. The mycookiename_sid is not set in this case.

Life is a process

Life is a journey, not a destination

Done it - magic_quotes_gpc is culprit

eigentor's picture

Well - whoever runs into a similar problem, might appreciate this information. On my local machine everything was working, as I said, so I checked for the already suspected Server issue. And indeed - magic_quotes_gpc was activated on the machine. Like mentioned in some issues http://drupal.org/node/6722 drupal does not like this. The setting somehow prevented the cookies from being set correctly.

It did not cause any other issues for me though - apart from this really nasty one. Ha, try and error has been the source of many a great invention!

So turn off magic_quotes_gpc and the 2.x version of phpbb module will love you - as Drupal in general will.

Life is a process

Life is a journey, not a destination

phpbb

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: