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

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

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

Started by aunrea, November 20, 2005, 10:25:07 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

aunrea

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


Nibbler

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.

aunrea

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='*****

Nibbler

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;

aunrea

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

Nibbler

Opps, missed out the dot. Change it to this

$UDB_DB_NAME_PREFIX = PHPBB_DB_NAME . '.';