Fatal error: Bridging cpg1.5.8 with phpbb3 3.0.7-PL1 Fatal error: Bridging cpg1.5.8 with phpbb3 3.0.7-PL1
 

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

Fatal error: Bridging cpg1.5.8 with phpbb3 3.0.7-PL1

Started by Psycho420, November 06, 2010, 04:32:37 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Psycho420

I have the following issue when trying to bridge coppermine and phpbb3:

When I try to bridge it without putting in the forums cookie prefix I can use coppermine but it redirects me to the forum login and does not transfer that info back to coppermine.
When I do add the forum prefix in the bridge manager I get the following fatal error message on all coppermine pages:

While executing query 'SELECT user_id, user_password, group_id FROM `420forums`.420time_noonhost_com_sessions INNER JOIN `420forums`.420time_noonhost_com_users ON session_user_id = user_id WHERE session_id = '20aa1e99b6d8ab61c20a4715f037e18a'' in bridge/phpbb3.inc.php on line 131

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 '.420time_noonhost_com_sessions INNER JOIN `420forums`.420time_noonhost_com_users' at line 1



Coppermine install: http://420gamingforums.com/420bucket/
Bridging app install: http://420gamingforums.com/forums/
Coppermine version: cpg1.5.8
Bridging app version: phpbb3 3.0.7-PL1
Test user account: user: test123/ pass: testing123

BridgeManager settings:
Bridge app URL:  http://420gamingforums.com/forums
Relative path to your bridge app's config file:  ../forums/
Cookie name or prefix:  phpbb3_r1o7v
Use post-based groups?:  0 

Nibbler

You should avoid using numbers at the start of table name prefixes when using MySQL based applications. Anyway, you should be able to fix this by changing bridge/phpbb3.inc.php from


            // 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'];


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'] . '`';

Psycho420

Right on! This fix did work... Thank you very much and I will definitely remember that for future installations.