[Solved]: Bridging phpBB2.0.22 and cpg1.4.21 [Solved]: Bridging phpBB2.0.22 and cpg1.4.21
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

[Solved]: Bridging phpBB2.0.22 and cpg1.4.21

Started by cutsick, March 11, 2009, 09:38:08 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

cutsick

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,

Nibbler

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.

cutsick

Thank you!!
QuoteWhile 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


cutsick


Nibbler

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


// 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


// 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

cutsick

Tanks, but it didn't work!

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

Fatal error:
QuoteWhile 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...

cutsick

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

Nibbler

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

cutsick

I'm an idiot, sorry!

seems to work fine now!
Thank you so much!

have a nice evening!!

cutsick

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!

Joachim Müller

Quote from: cutsick on April 19, 2009, 11:17:07 AM
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?

Quote from: cutsick on April 19, 2009, 11:17:07 AM
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.