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: [Solved]: Bridging phpBB2.0.22 and cpg1.4.21  (Read 6680 times)

0 Members and 1 Guest are viewing this topic.

cutsick

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
[Solved]: Bridging phpBB2.0.22 and cpg1.4.21
« on: March 11, 2009, 09:38:08 pm »

I have the following issue when trying to bridge coppermine and phpbb2.0.22:
Fatal Error:

Coppermine install: http://swedcartest.bplaced.net/copper/
Forum install: http://swedcartest.bplaced.net/forum/
Coppermine version: cpg1.4.21
Forum version: phpBB 2.0.22
Test user account: test / test

BridgeManager settings:
Forum URL:  http://swedcartest.bplaced.net/forum
Relative path to your BBS's config file:  ../forum/ 
Use post-based groups?:  0 (if 1 more fatal error!)
Cookie name/preifx (if applicable) swedcar

cpg can not get userdata form phpbb
the only message is fatal error.

would anybody help me please!?!
Gerne kann mir auch auf deutsch geholfen werden ;-)

danke, thank u, merci,
« Last Edit: March 11, 2009, 10:53:27 pm by Nibbler »
Logged

Nibbler

  • Guest
Re: Bridging phpBB2.0.22 and cpg1.4.21
« Reply #1 on: March 11, 2009, 10:03:06 pm »

Enable debug mode to get a real error message.

http://coppermine-gallery.net/tutorial/debug_mode.php

Make sure you are using the '2.0.18 or better' phpbb bridge.
Logged

cutsick

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
Re: Bridging phpBB2.0.22 and cpg1.4.21
« Reply #2 on: March 11, 2009, 10:13:09 pm »

Thank you!!
Quote
While executing query "SELECT u.user_id AS user_id, u.user_password AS password, u.user_level FROM `swedcartest`.60832_users AS u, `swedcartest`.60832_sessions AS s WHERE u.user_id=s.session_user_id AND s.session_id = 'a530de1bb2dca3605919dde8f53956e1' AND u.user_id > 0" on Resource id #17

mySQL error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.60832_users AS u, `swedcartest`.60832_sessions AS s WHERE u.user_id=s.session_u' at line 1

Logged

cutsick

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
Re: Bridging phpBB2.0.22 and cpg1.4.21
« Reply #3 on: March 11, 2009, 10:14:37 pm »

and that means?
Logged

Nibbler

  • Guest
Re: Bridging phpBB2.0.22 and cpg1.4.21
« Reply #4 on: March 11, 2009, 10:34:15 pm »

I think it has a problem with the table names in phpbb starting with a number. Try adding extra backticks around them by changing

Code: [Select]
// Derived full table names
$this->usertable = '`' . $this->db['name'] . '`.' . $this->db['prefix'] . $this->table['users'];
$this->groupstable =  '`' . $this->db['name'] . '`.' . $this->db['prefix'] . $this->table['groups'];
$this->sessionstable =  '`' . $this->db['name'] . '`.' . $this->db['prefix'] . $this->table['sessions'];
$this->usergroupstable = '`' . $this->db['name'] . '`.' . $this->db['prefix'] . $this->table['usergroups'];
$this->sessionskeystable = '`' . $this->db['name'] . '`.' . $this->db['prefix'] . $this->table['sessionskeys'];

to

Code: [Select]
// Derived full table names
$this->usertable = '`' . $this->db['name'] . '`.`' . $this->db['prefix'] . $this->table['users'] . '`';
$this->groupstable =  '`' . $this->db['name'] . '`.`' . $this->db['prefix'] . $this->table['groups'] . '`';
$this->sessionstable =  '`' . $this->db['name'] . '`.`' . $this->db['prefix'] . $this->table['sessions'] . '`';
$this->usergroupstable = '`' . $this->db['name'] . '`.`' . $this->db['prefix'] . $this->table['usergroups'] . '`';
$this->sessionskeystable = '`' . $this->db['name'] . '`.`' . $this->db['prefix'] . $this->table['sessionskeys'] . '`';

in bridge/phpbb2018.inc.php
Logged

cutsick

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
Re: Bridging phpBB2.0.22 and cpg1.4.21
« Reply #5 on: March 11, 2009, 10:41:00 pm »

Tanks, but it didn't work!

I've added  . '`' between ] an ; and retried bridging

Fatal error:
Quote
While executing query "SELECT u.user_id, u.user_password, u.user_level FROM `swedcartest`.60832_sessions_keys` AS s
                     INNER JOIN `swedcartest`.60832_users` AS u ON s.user_id = u.user_id WHERE u.user_id = '38' AND u.user_active = 1 AND s.key_id = MD5('c8850eacad4fbdafbc8b0d93fdf28522')" on Resource id #17

mySQL error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.60832_sessions_keys` AS s
                     INNER JOIN `swedcartest`.60832_users` AS u ON' at line 1
i'm sorry, my SQL is not good...
Logged

cutsick

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
Re: Bridging phpBB2.0.22 and cpg1.4.21
« Reply #6 on: March 11, 2009, 10:42:09 pm »

Oh, User ID 38 is the user i tried to log in!
Logged

Nibbler

  • Guest
Re: Bridging phpBB2.0.22 and cpg1.4.21
« Reply #7 on: March 11, 2009, 10:45:52 pm »

Copy/paste the code I gave you into your file. You only applied half the change.
Logged

cutsick

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
Re: Bridging phpBB2.0.22 and cpg1.4.21
« Reply #8 on: March 11, 2009, 10:51:53 pm »

I'm an idiot, sorry!

seems to work fine now!
Thank you so much!

have a nice evening!!
Logged

cutsick

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
Re: [Solved]: Bridging phpBB2.0.22 and cpg1.4.21
« Reply #9 on: April 19, 2009, 11:17:07 am »

after a few changes i have an other problem now.

when i bridge cpg with the phpBB2 on an other server i am automaticly rediirectet do the forum. i cant even see the cpg.

Coppermine install: http://swedcartest.bplaced.net/copper/
Forum install: http://swedcarforum.bplaced.net/forum/
Coppermine version: cpg1.4.21
Forum version: phpBB 2.0.22
Test user account: test / test

BridgeManager settings:
Forum URL:  http://swedcarforum.bplaced.net/forum
Relative path to your BBS's config file:  ../forum/       <-- still exists on the old server
Use post-based groups?:  0
Cookie name/preifx (if applicable) phpbb2swedcarneu

i know it's not ideal to run the forum and the cpg on different servers but i need to if possible.

thank you for your help!
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: [Solved]: Bridging phpBB2.0.22 and cpg1.4.21
« Reply #10 on: April 19, 2009, 03:46:51 pm »

when i bridge cpg with the phpBB2 on an other server i am automaticly rediirectet do the forum. i cant even see the cpg.
In Coppermine's config, turn "Allow unlogged users (guest or anonymous) access" on if it bothers you to see everybody redirected when accessing coppermine. Not allowing unlogged users measn they have to log in, that's why coppermine redirects immediately to your forum's login page. That's expected behaviour, so why do you complain?

i know it's not ideal to run the forum and the cpg on different servers but i need to if possible.
I'm not sure for phpbb, but afaik this is impossible. Read up the subdomain section of the preliminary docs for cpg1.5.x - they explain in more detail what you need to take into account when bridging between different subdomains. If subdomains reside on different servers, it's hard to impossible to enable bridging.

After trying to log in with the test user account you provided I get redirected to http://www.swedcarforum.at/copper/, which appears not to exist any longer and therefor returns a 404 page (that is very cluttered with adverts and hardly can be considerered a valid 404 page btw. - you might want to consider actually spending a few bucks on improved webhosting). Fix your redirection target by setting the URL of coppermine properly in coppermine's config.
Logged
Pages: [1]   Go Up
 

Page created in 0.021 seconds with 19 queries.