Problems with Bridging of cpg 1.4.2 and phpBB 2.0.21 Problems with Bridging of cpg 1.4.2 and phpBB 2.0.21
 

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

Problems with Bridging of cpg 1.4.2 and phpBB 2.0.21

Started by felguard, July 31, 2006, 02:36:05 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

felguard

I have the following issue when trying to bridge coppermine and phpBB: When I click on register, the page cannot be found. But the register.php file exists in the directory, it's strange that it cannot be found. I even tried replacing the register.php file with a new one. Also when I click on login, it redirects to the forums login page (http://www.deimonhigh.com/forums/login.php?redirect=../gallery/).

I replaced my phpbb.inc.php with the file found here: http://forum.coppermine-gallery.net/index.php?topic=23281.0

Then with the downloaded file, I change the following to this:

// ------------------------------------------------------------------------- //
// phpBB2 2.0.18 Integration for Coppermine                                         //
// ------------------------------------------------------------------------- //
// Modify the values below according to your Board installation              //
// ------------------------------------------------------------------------- //

// database configuration
define('PHPBB_DB_NAME', 'forums'); // The name of the database used by the board
define('PHPBB_BD_HOST', 'localhost'); // The name of the database server
define('PHPBB_DB_USERNAME', 'user'); // The username to use to connect to the database
define('PHPBB_DB_PASSWORD', '******'); // The password to use to connect to the database

// The web path to your phpBB directory
// If your URL to your board is for example 'http://yoursite_name.com/phpBB2/',
// you'll have to set the below var to '/phpBB2/'.
define('PHPBB_WEB_PATH', '/forums/');


Coppermine install: http://www.deimonhigh.com/gallery/
Forum install: http://www.deimonhigh.com/forums/
Coppermine version: cpg 1.4.2
Forum version: phpBB 2.0.21
Test user account: N/A due to register.php saying it cannot be found when it exists in the directory

BridgeManager settings:
Forum URL:  http://deimonhigh.com/forums/
Relative path to your BBS's config file:  ../forums/ 
Use post-based groups?:  0 
Cookie prefix: phpBB2

Nibbler

1) You can't use the bridge file from 1.3 on a 1.4 gallery. The code is completely different.
2) Update your gallery
3) Test accounts need to be made via the forum, that is the point of bridging - coppermine works with the users from the forum.
4) The error message means that the page register.php is redirecting you to does not exist, not register.php itself.

Joachim Müller

Read up bridging in the docs. In cpg1.3.x, you had to edit the bridge file. In cpg1.4.x, this has changed: you don't edit a file, but run the bridge manager. The settings are being stored in the database instead of a file.

felguard

1) Okay since I've upgraded to 1.4.8 now, the bridge file was replaced.
2) Updated.
3) Login Details:
Username: copper
Password: copper
4) The gallery register page now redirects to the forums register page.

To GauGau, yeah I first ran the bridge manager thing, but afterwards I edited the bridge file because I thought it would help. But it didn't so I replaced the edited bridge file with the original.

Nibbler

Now you need to correct your cookie path and cookie prefix.

felguard

Don't mean to be an idiot here, but how may I do this? I can't access the bridge manager becase I can't log in, when I do, the gallery page is just as if I didn't log in, but the forums says I am. Also, do you know how I can find my cookie path and prefix? Thanks.

Joachim Müller

You need to edit those two settings in your forum app, not in coppermine. The whole point of bridging is that Coppermine drops it's own user authentification and reads the authentification of your BBS instead. To be capable to do so, Coppermine needs to be able to read the cookies your BBS sets. You have deliberately configured your BBS in a manner that disallows Coppermine to read those cookies, so there's nothing you could do from within Coppermine. You have to review your BBS's config section. Reading up cookie technology is recommended.

felguard

Oh I see, that makes sense.

Right now my cookie prefix is: /forums
I tried changing it to just: /
But then I couldn't log in, so I changed it back.

Here's my current cookie settings for phpBB:
Cookie domain: www.deimonhigh.com
Cookie name: phpBB2_forum
Cookie path: /forums

Joachim Müller

Cookie path needs to be /. Clear your local cookies and cache in your browser after changing the BBS settings. Do as suggested and read up cookie technology.

felguard

#9
My mistake, when I said this:
QuoteRight now my cookie prefix is: /forums
I tried changing it to just: /
But then I couldn't log in, so I changed it back.
I mean my cookie path, not prefix. But yeah, same problem. I even cleared my cookies, I can login to the gallery nor forums afterwards.

Here is my current info:
Forum Details:
cookie_name: phpBB2_forum
cookie_path: /
cookie_domain: www.deimonhigh.com
Gallery Details:
cookie_name: cpg140
cookie_path: /

Where may I read up on cookie technology? Do you mean like on google?

Joachim Müller

Quote from: felguard on July 31, 2006, 10:38:53 AM
cookie_domain: www.deimonhigh.com
change it to
Quote.deimonhigh.com
(mind the leading dot!).

Quote from: felguard on July 31, 2006, 10:38:53 AM
Where may I read up on cookie technology? Do you mean like on google?
Yes, exactly. Good place to start as well is Wikipedia, i.e. http://en.wikipedia.org/wiki/HTTP_cookie

felguard

Changed the cookie_domain, but still no luck. The forum I get logged in, but not the gallery.

So a cookie is like an ID that lets you browse through without having to login every single time..

Joachim Müller

When changing cookie settings, you have to clear your local cookies.

felguard

Deleting local cookies as in Tools > Internet Options > Delete Cookies/Files right? If so, I can't seem to get it to work.

If it's not too much trouble, may you please try using the copper/copper account and see if it works for you. Thank you.

Nibbler

Make sure the cookie name in the bridge manager is correct, phpBB2_forum

felguard

Did you mean the cookie_prefix? Because in phpmyadmin, when I check out the cpg_bridge table, I can't find a cookie_name.

Or did you mean the cookie_name in the cpg_config table?


felguard

Did I ever tell you both how much I loved you?

Blah, sorry about that. It's just that after so much time spent on fixing this problem and finally getting it to work just gives me so much joy. Thank you both very much, the best support out there.

Regards,