Advanced search  

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]

Pages: [1]   Go Down

Author Topic: Bridging Coppermine with Mambo  (Read 7534 times)

0 Members and 1 Guest are viewing this topic.

Andrei

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Bridging Coppermine with Mambo
« on: July 25, 2006, 10:10:43 am »

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
« Last Edit: August 12, 2006, 02:19:15 am by Nibbler »
Logged

SLC

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: Bridging Coppermine with Mambo
« Reply #1 on: July 28, 2006, 07:15:03 pm »

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.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Logged

SLC

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: Bridging Coppermine with Mambo
« Reply #3 on: July 28, 2006, 08:19:03 pm »

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.
« Last Edit: August 09, 2006, 05:17:20 am by SLC »
Logged

SLC

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: Bridging Coppermine with Mambo
« Reply #4 on: July 30, 2006, 07:12:30 pm »

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.
Logged

Nibbler

  • Guest
Re: Bridging Coppermine with Mambo
« Reply #5 on: July 30, 2006, 07:24:08 pm »

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

Nibbler

  • Guest
Re: Bridging Coppermine with Mambo
« Reply #6 on: July 30, 2006, 10:56:41 pm »

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

Code: [Select]
$sessioncookie = $_COOKIE['sessioncookie'];

and change to

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


Just like that!
Logged

SLC

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: Bridging Coppermine with Mambo
« Reply #7 on: July 31, 2006, 01:42:59 am »

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.
« Last Edit: July 31, 2006, 01:51:44 am by SLC »
Logged

SLC

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: Bridging Coppermine with Mambo
« Reply #8 on: July 31, 2006, 01:51:07 am »

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.
Logged

Nibbler

  • Guest
Re: Bridging Coppermine with Mambo
« Reply #9 on: July 31, 2006, 01:52:06 am »

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

SLC

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: Bridging Coppermine with Mambo
« Reply #10 on: July 31, 2006, 02:30:49 am »

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
Logged

Nibbler

  • Guest
Re: Bridging Coppermine with Mambo
« Reply #11 on: July 31, 2006, 02:43:17 am »

Are you using mambo 4.5.4 ?
Logged

Andrei

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: Bridging Coppermine with Mambo
« Reply #12 on: August 05, 2006, 03:29:03 pm »

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)
Logged
Pages: [1]   Go Up
 

Page created in 0.023 seconds with 19 queries.