Fatal Error - There was an error while processing a database query. Fatal Error - There was an error while processing a database query.
 

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 - There was an error while processing a database query.

Started by vegascoug, July 28, 2005, 07:55:40 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

vegascoug

I am new to PHP and all this stuff, to please be patient with my questions.

Both phpBB and cpg133 reside on the same server in the same html_public directory for my website

I want to bridge coppermine and phpBB, seemed simple enough, but I cannot get it to work, keep getting the following error:

Fatal Error

There was an error while processing a database query.

While executing query "SELECT user_id, username as user_name, user_level FROM `p_bb1`.thescrap_users WHERE user_id='2' AND user_password='' AND user_active='1'" on 0

mySQL error: Access denied for user: 'thescrap@localhost' to database 'p_bb1'

The database that is set up is correct, as far as I know.  When I change it it says doesn't exist.  This error tells me it's connecting correctly, but not getting access.

thescrap is the User ID I use to login to the website, control panel, PHPMyAdmin, Coppermine Admin Section and phpBB Admin.  So I am not sure why it wouldn't be allowed access.

phpBB.inc.php configuration:
// database configuration
define('PHPBB_DB_NAME', 'p_bb1'); // The name of the database used by the board
define('PHPBB_BD_HOST', 'localhost'); // The name of the database server
define('PHPBB_DB_USERNAME', 'thescrap'); // The username to use to connect to the database
define('PHPBB_DB_PASSWORD', '*****'); // The password to use to connect to the database

cpg_redir.php configuration (default, didn't change this)
<?php
if (!$_SERVER['HTTP_HOST']) {
  $cpg_host=$HTTP_SERVER_VARS['HTTP_HOST'];
} else {
  $cpg_host=$_SERVER['HTTP_HOST'];
}
$cpg_path='/cpg133';
header("Location: http://".$cpg_host.$cpg_path);
exit;
?>

Nibbler

Make sure coppermine and the forum are located in the same database.

vegascoug

As far as I can tell they are both located under thescrap_p_bb1 under localhost

I checked using phpMyAdmin and if I click on the thescrap_p_bb1 link, I can see all the tables listed on there for cpg133 and phpBB.  I can view the profiles of both user DBs, so I know they are working separately in there.

Why they aren't working together is a mystery to me.  This is why I hate php, I can't ever figure it out!

Mike

vegascoug

Got past this part, now I get to cpg home page without errors, however I am not logged in.  If I click the login link, it takes me back to the phpBB home page.  If I click the register link, it takes me to the phpBB register page.  That gives me hope, cpg must be using the phpBB DB, but why isn't it logging me in?

When I created this I didn't have a group created with any users.  I have done that since then, do I need to reset something?

Joachim Müller

you started a new thread on this issue, so I'm marking this one as solved (after moving to the bridging board where it should have gone to in the first place)