Bridging Coppermine with Mambo Bridging Coppermine with Mambo
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Bridging Coppermine with Mambo

Started by Andrei, July 25, 2006, 10:10:43 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Andrei

Hey,
I tried to bridge Coppermine and Mambo, both previously installed on my server, by using the Mambo server wizard in Coppermine. Bridging did not show any errors, and after that, by clicking on LOGIN or REGISTER in Coppermine, people get sent to the correct pages in Mambo.
However, after you log on in mambo, you don't get logged on in Coppermine! Is there something I don't understand about the way this should work?

Coppermine install: http://www.habitatcluj.ro/foto/
Forum install: http://www.habitatcluj.ro/   (in root directory)
Coppermine version: cpg1.4.8
Forum version: mambo 4.5.4
Test user account: <removed>

BridgeManager settings:
Forum URL:  http://www.habitatcluj.ro
Relative path to your BBS's config file:  ../
Use post-based groups?:  1

SLC

I did an install yesterday and I'm having the same exact problem.  I tried messing around with the mambo.inc.php file and I think the problem is somehow it's not getting the correct session id from the session cookie and therefore when it goes to the sessions table in mambo to look for the user it comes back empty.  I've done quite a bit of coding in mambo so that how I figured that out, but I'm not quite sure how to correct this issue.

Joachim Müller


SLC

#3
I have the following issue when trying to bridge coppermine and Mambo:
Log in to mambo successfully, but right afterwords when I go to the compermine page I lose all user credintials.

Site info removed.

SLC

At this point I'm guessing no one in the Coppermine community knows the answer to this problem.  If so, I'd just like to know that so that I can continue searching for a photo gallery software on coppermine's level that will integrate with mambo.

Thanks.

Nibbler

There might be a problem with the bridge file, I'll check it tonight.

Nibbler

OK, there was an issue with the file. I think the mambo code has changed since the bridge for it was created but luckily there is an easy fix.

bridge/mambo.inc.php, locate


$sessioncookie = $_COOKIE['sessioncookie'];


and change to


$sessionCookieName = md5( 'site'.$this->boardurl);
$sessioncookie = $_COOKIE[$sessionCookieName];



Just like that!

SLC

#7
I made the change, but it still loses the user's credentials. 

In the mambo.inc.php file there's a line that queries mambo's session table to get the userid using the $sessioncookie variable.  I monitored the sessions table in my database, then echo'd the md5'd output of the $sessioncookie variable after making the change above and it does not match the session_id in the session table for the username I logged into mambo under, therefore when the query executes it comes back empty.  This happend with the original file and also with the file once I made the suggested changes.  Any other ideas on what to do?

Thanks.

SLC

Actually, after implementing the change the sessioncookie comes back blank.  Before the change it came back with something although after md5'ing the id it didn't match what was in the table.

Nibbler

Make sure you have the exact same url entered in both the bridge manager and mambo.

SLC

It took a while but I figured it out.

It should be:
$sessioncookie = $_COOKIE['sessioncookie'];
$sessioncookie = $sessioncookie. $_SERVER['SERVER_ADDR'];

I found this out by observing how mambo sets the session_id in the mambo.php file.

Hope this helps everyone who come accross this issue.

SLC

Nibbler


Andrei

Thank you, Nibbler!

I modified the code with the one you provided and everything works as expected.
I log on on the main page, and when I go to the gallery, I am also logged on and can work as admin.

Thanks again.
(I will modify my original post now, to remove the personal / site info)