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);
// 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 ;)
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;
?>
$cpg_path should just be '/gallery/'
Yup, I just figured that out! Sorry...I'm a newbie at this!
Thanks again!
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?
That synchronizes the user groups, and you only need to do it if you change the groups you have defined in phpbb.