coppermine-gallery.com/forum

Support => cpg1.3.x Support => Older/other versions => cpg1.3 (BBS) Integration / Bridging => Topic started by: iCoty on August 13, 2004, 11:00:25 AM

Title: [Solved]: Unable to connect to phpBB Board database!
Post by: iCoty on August 13, 2004, 11:00:25 AM
I am trying to integrate coppermine gallery and phpbb2. I have tested both out separately and they both work fine. However, when I try and perform the intregration I recieve the following error:

"Coppermine critical error:
Unable to connect to phpBB Board database !

MySQL said: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)"

Both my phpbb and coppermine gallery are located on the same server and share the same mysql database.

My edited "init.inc.php" file:

define('COPPERMINE_VERSION', '1.3.1');
// User database integration
// Uncomment the applicable line if you want to use it
define('UDB_INTEGRATION', 'phpbb');
// define('UDB_INTEGRATION', 'invisionboard');
// define('UDB_INTEGRATION', 'vbulletin23');
// define('UDB_INTEGRATION', 'vbulletin30');
// define('UDB_INTEGRATION', 'yabbse');
// define('UDB_INTEGRATION', 'smf');
// define('UDB_INTEGRATION', 'woltlab21');

My edited "phpbb.inc.php" file:

// database configuration
define('PHPBB_DB_NAME', 'phpBB'); // mydatabase
define('PHPBB_BD_HOST', 'localhost'); // mysql06.powweb.com
define('PHPBB_DB_USERNAME', 'root'); // ***
define('PHPBB_DB_PASSWORD', ''); // ***

// http://virtualaftershock.com/forum/
// 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', '/forum/');
// 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', FALSE);
Title: Re: Unable to connect to phpBB Board database!
Post by: Nibbler on August 13, 2004, 12:38:07 PM
// database configuration
define('PHPBB_DB_NAME', 'database_name_goes_in_here'); // this is just a comment - it does nothing
define('PHPBB_BD_HOST', 'mysql_server_name_goes_in_here'); // this is just a comment - it does nothing
define('PHPBB_DB_USERNAME', 'your_username'); // this is just a comment - it does nothing
define('PHPBB_DB_PASSWORD', 'your_password'); // this is just a comment - it does nothing


You be changing the wrong bits ;)
Title: Re: Unable to connect to phpBB Board database!
Post by: iCoty on August 13, 2004, 01:06:17 PM
Thanks for the quick reply! Okay, I can once again see my gallery okay...but I have encountered a new problem! When i try to logout from the gallery i get this response:

"Could not open the page "http://www.virtualaftershock.comvirtualaftershock.com/gallery/" because the server "www.virtualaftershock.comvirtualaftershock.com" could not be found."

I'm assuming that i once again screwed up the code since my url appears twice, but can't figure out where.

I think it has soemthing to do with the "cpg_redir.php" file:

<?php
if (!$_SERVER['HTTP_HOST']) {
  $cpg_host=$HTTP_SERVER_VARS['HTTP_HOST'];
} else {
  $cpg_host=$_SERVER['HTTP_HOST'];
}
$cpg_path='virtualaftershock.com/gallery/';
header("Location: http://".$cpg_host.$cpg_path);
exit;
?>
Title: Re: Unable to connect to phpBB Board database!
Post by: Nibbler on August 13, 2004, 01:21:19 PM
$cpg_path should just be '/gallery/'
Title: Re: Unable to connect to phpBB Board database!
Post by: iCoty on August 13, 2004, 01:26:29 PM
Yup, I just figured that out! Sorry...I'm a newbie at this!

Thanks again!
Title: Re: Unable to connect to phpBB Board database!
Post by: iCoty on August 13, 2004, 01:42:32 PM
So, by simply clicking "groups" under the admin control in the coppermine gallery, all users on my forum will be synchronized with the gallery? Do I need to do this everytime there is a new user?
Title: Re: Unable to connect to phpBB Board database!
Post by: Nibbler on August 13, 2004, 01:47:01 PM
That synchronizes the user groups, and you only need to do it if you change the groups you have defined in phpbb.