coppermine-gallery.com/forum

Support => cpg1.3.x Support => Older/other versions => cpg1.3 (BBS) Integration / Bridging => Topic started by: aunrea on November 20, 2005, 10:25:07 AM

Title: Fatal error : There was an error while processing a database query
Post by: aunrea on November 20, 2005, 10:25:07 AM
I just bridged my coppermine to my phpbb 2.0.18 forum. I used the new file as posted in this forum. But when I go to my gallery I get this error:

QuoteFatal error :
There was an error while processing a database query

My gallery is at: http://hogwarts.spot-design.net/gallery
and my forum is at: http://hogwarts.spot-design.net

This is the setup I have:

// database configuration
define('PHPBB_DB_NAME', 'db113821432'); // The name of the database used by the board
define('PHPBB_BD_HOST', 'db123.perfora.net'); // The name of the database server
define('PHPBB_DB_USERNAME', 'dbo113821432'); // 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', '');
// Logout Flag
// the value of this boolean constant depends on your phpBB version:
// If your version of phpBB is 2.0.4 or lower - change the value to FALSE;
// if your version of phpBB is 2.0.5 or newer - leave it as TRUE
define('PHPBB_LOGOUT_GET', TRUE);
// ------------------------------------------------------------------------- //
// You can keep the default values below if your instalation is standard
// ------------------------------------------------------------------------- //
// The prefix for the phpBB cookies
define('PHPBB_COOKIE_PREFIX', 'phpbb2mysql'); // The prefix used for board cookies

// Prefix and names for the database tables
define('PHPBB_TABLE_PREFIX', '3b_'); // The prefix used for the DB tables
define('PHPBB_USER_TABLE', 'users'); // The members table
define('PHPBB_SESSION_TABLE', 'sessions'); // The session table
define('PHPBB_GROUP_TABLE', 'groups'); // The groups table
define('PHPBB_UGROUP_TABLE', 'user_group'); // The group/user table

Title: Re: Fatal error : There was an error while processing a database query
Post by: Nibbler on November 20, 2005, 02:31:40 PM
Disable the bridge (by reversing the change to init.inc.php), enable debug mode in config, re-enable the bridge and post the mysql error message that you then get.
Title: Re: Fatal error : There was an error while processing a database query
Post by: aunrea on November 21, 2005, 03:56:11 AM
QuoteWhile executing query "SELECT user_id, username as user_name, user_level FROM `db113821432`.3b_users WHERE user_id='2' AND user_password='******' AND user_active='1'" on 0

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 '.3b_users WHERE user_id='2' AND user_password='*****
Title: Re: Fatal error : There was an error while processing a database query
Post by: Nibbler on November 22, 2005, 12:08:04 AM
Try changing this line in the bridge file

$UDB_DB_NAME_PREFIX = PHPBB_DB_NAME ? '`' . PHPBB_DB_NAME . '`.' : '';

to this

$UDB_DB_NAME_PREFIX = PHPBB_DB_NAME;
Title: Re: Fatal error : There was an error while processing a database query
Post by: aunrea on November 22, 2005, 08:19:31 AM
I get this message:

QuoteFatal error :

There was an error while processing a database query.

This is what the debug said:

While executing query "SELECT user_id, username as user_name, user_level FROM db1138214323b_sessions INNER JOIN db1138214323b_users ON session_user_id = user_id WHERE session_id='a85d08aafcf6412859645c4039bb1091' AND session_user_id ='-1' AND user_active='1'" on 0

mySQL error: Table 'db113821432.db1138214323b_sessions' doesn't exist
Title: Re: Fatal error : There was an error while processing a database query
Post by: Nibbler on November 22, 2005, 06:52:34 PM
Opps, missed out the dot. Change it to this

$UDB_DB_NAME_PREFIX = PHPBB_DB_NAME . '.';