i've got a phpBB v. 2.0.15 and dled coppermine v.1.3.3. i installed it and everything was working fine, then i tried the integration methods, and everytime i just keep getting this error when trying to access the gallery Notice: Use of undefined constant PHPBB_BD_HOST - assumed 'PHPBB_BD_HOST' in /usr/local/apache2/htdocs/jaanisark/coppermine_dir/bridge/phpbb.inc.php on line 526
Notice: Use of undefined constant PHPBB_DB_NAME - assumed 'PHPBB_DB_NAME' in /usr/local/apache2/htdocs/jaanisark/coppermine_dir/bridge/phpbb.inc.php on line 530
Notice: Use of undefined constant PHPBB_DB_NAME - assumed 'PHPBB_DB_NAME' in /usr/local/apache2/htdocs/jaanisark/coppermine_dir/bridge/phpbb.inc.php on line 530
Coppermine critical error:
Unable to connect to phpBB Board database !
MySQL said: Unknown MySQL Server Host 'PHPBB_BD_HOST' (0)
I've THOUROUGHLY searched the forums for answers but none of them seem to work. Here are my files that i used...
/bridge/phpbb.inc.php
// ------------------------------------------------------------------------- //
// phpBB2 Integration for Coppermine //
// ------------------------------------------------------------------------- //
// Modify the values below according to your Board installation //
// ------------------------------------------------------------------------- //
// database configuration
define('PHPBB_DB_NAME', 'jaanisark'); // The name of the database used by the board
define('PHPBB_BD_HOST', 'mysql'); // The name of the database server
define('PHPBB_DB_USERNAME', 'xxx'); // The username to use to connect to the database
define('PHPBB_DB_PASSWORD', 'xxx'); // 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', '/jaanisark/php/');
// 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);
/include/int.inc.php
define('COPPERMINE_VERSION', '1.3.3');
// 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');
// define('UDB_INTEGRATION', 'punbb');
if (!defined('IN_COPPERMINE')) die('Not in Coppermine...');
// Start output buffering
cpg_redir.php
<?php
if (!$_SERVER['http://www.dhost.info/']) {
$cpg_host=$HTTP_SERVER_VARS['HTTP_HOST'];
} else {
$cpg_host=$_SERVER['HTTP_HOST'];
}
$cpg_path='/jaanisark/coppermine_dir';
header("Location: http://".$cpg_host.$cpg_path);
exit;
?>
Please tell me what i am doing wrong, heres the link to the gallery.
http://dhost.info/jaanisark/coppermine_dir/
and the link to my forum..
http://www.dhost.info/jaanisark/php/
i've created an account for you for my forum although i dont think u'll need it to help me solve my problem
sn. testaccount
pw. test
thanks in advance
-Jaanisar
I'm getting the same error. Please help!
Quote from: xfwayne on August 16, 2005, 09:25:36 AM
I'm getting the same error. Please help!
Then post the same data that nismoskys provided, as it's needed to help you fix your issues! >:(
*edited repetition*
xfwayne
Thanks for the quick reply, GauGau.
Index Error:
Notice: Use of undefined constant PHPBB_BD_HOST - assumed 'PHPBB_BD_HOST' in /hsphere/local/home/villagec/hmongvillage.com/mystuff/bridge/phpbb.inc.php on line 526
Notice: Undefined index: mysql*.mysql5.ixwebhosting.com in /hsphere/local/home/villagec/hmongvillage.com/mystuff/bridge/phpbb.inc.php on line 526
Notice: Use of undefined constant PHPBB_DB_NAME - assumed 'PHPBB_DB_NAME' in /hsphere/local/home/villagec/hmongvillage.com/mystuff/bridge/phpbb.inc.php on line 530
Notice: Use of undefined constant PHPBB_DB_NAME - assumed 'PHPBB_DB_NAME' in /hsphere/local/home/villagec/hmongvillage.com/mystuff/bridge/phpbb.inc.php on line 530
Coppermine critical error:
Unable to connect to phpBB Board database !
MySQL said: Unknown MySQL Server Host 'mysql5ixwebhostingcom' (1)
phpbb.inc.php as stated above:
// ------------------------------------------------------------------------- //
// phpBB2 Integration for Coppermine //
// ------------------------------------------------------------------------- //
// Modify the values below according to your Board installation //
// ------------------------------------------------------------------------- //
// database configuration
define('village_nuke', 'phpBB'); // The name of the database used by the board
define('mysql5.ixwebhosting.com', 'localhost'); // The name of the database server
define('admin', 'root'); // The username to use to connect to the database
define('***', ''); // The password to use to connect to the database
Also:
// ------------------------------------------------------------------------- //
// Define wheter we can join tables or not in SQL queries (same host & same db or user)
define('UDB_CAN_JOIN_TABLES', (PHPBB_BD_HOST == $CONFIG['mysql*.mysql5.ixwebhosting.com'] && (PHPBB_DB_NAME == $CONFIG['village_coppermine'] || PHPBB_DB_USERNAME == $CONFIG['admin'])));
init.inc codes:
define('COPPERMINE_VERSION', '1.3.3');
// 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');
// define('UDB_INTEGRATION', 'punbb');
if (!defined('IN_COPPERMINE')) die('Not in Coppermine...');
// Start output buffering
cpg_redir codes:
<?php
if (!$_SERVER['HTTP_HOST']) {
$cpg_host=$HTTP_SERVER_VARS['HTTP_HOST'];
} else {
$cpg_host=$_SERVER['HTTP_HOST'];
}
$http://hmong='http://hmongvillage.com/mystuff';
header("Location: http://".$cpg_host.$http://hmongvillage.com/mystuff);
exit;
?>
Quote from: xfwayne on August 16, 2005, 09:42:42 AM
MySQL said: Unknown MySQL Server Host 'mysql5ixwebhostingcom' (1)
Try localhost. The line
define('mysql5.ixwebhosting.com', 'localhost'); // The name of the database server
should read
define('PHPBB_BD_HOST', 'localhost'); // The name of the database server
Thanks, Gauau. You were a lot of help! I also had to change the db name, as well.
Here is the next error:
Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /hsphere/local/home/villagec/hmongvillage.com/mystuff/bridge/phpbb.inc.php on line 530
fyi, I tried to uploaded and replaced the language folde,r /lang. Still getting the same error.
fyi, I did the same thing with phpbb.inc and receive the same error.
attach your bridge file (rename it to phpbb.inc.php.txt before, and replace your password with asterisks) to your posting.
Here it is.
Thanks, GauGau.
Start over with a fresh copy of the file, and only change the sections you are instructed to change.
After reinstalling, I got the same error.
QuoteNotice: Use of undefined constant PHPBB_BD_HOST - assumed 'PHPBB_BD_HOST' in /hsphere/local/home/villagec/hmongvillage.com/mystuff/bridge/phpbb.inc.php on line 526
Notice: Undefined index: mysql*.mysql5.ixwebhosting.com in /hsphere/local/home/villagec/hmongvillage.com/mystuff/bridge/phpbb.inc.php on line 526
Notice: Use of undefined constant PHPBB_DB_NAME - assumed 'PHPBB_DB_NAME' in /hsphere/local/home/villagec/hmongvillage.com/mystuff/bridge/phpbb.inc.php on line 530
Notice: Use of undefined constant PHPBB_DB_NAME - assumed 'PHPBB_DB_NAME' in /hsphere/local/home/villagec/hmongvillage.com/mystuff/bridge/phpbb.inc.php on line 530
Coppermine critical error:
Unable to connect to phpBB Board database !
MySQL said: Unknown MySQL Server Host 'mysql5ixwebhostingcom' (1)
Upon seeing that, I changed as instructed below.
Quote from: GauGau on August 16, 2005, 10:26:37 AM
Quote from: xfwayne on August 16, 2005, 09:42:42 AM
MySQL said: Unknown MySQL Server Host 'mysql5ixwebhostingcom' (1)
Try localhost. The linedefine('mysql5.ixwebhosting.com', 'localhost'); // The name of the database server
should readdefine('PHPBB_BD_HOST', 'localhost'); // The name of the database server
Now, this is the error I'm getting:
QuoteNotice: Use of undefined constant PHPBB_DB_NAME - assumed 'PHPBB_DB_NAME' in /hsphere/local/home/villagec/hmongvillage.com/mystuff/bridge/phpbb.inc.php on line 530
Notice: Use of undefined constant PHPBB_DB_NAME - assumed 'PHPBB_DB_NAME' in /hsphere/local/home/villagec/hmongvillage.com/mystuff/bridge/phpbb.inc.php on line 530
Coppermine critical error:
Unable to connect to phpBB Board database !
MySQL said: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
What now? Thanks.
Here is the file.
I have told you before that
define('village_nuke', 'phpBB');
should actually be
define('PHPBB_DB_NAME', 'village_nuke'); // The name of the database used by the board
. It looks like you're not reading properly: when editing the bridge file entries, you're suppossed to edit the second part of the define statement, not the first part. A line like
Quotedefine('foo', 'bar');
means "define the constant named "foo" and fill it with the value "bar". If you change the name of the constant, the script will definitely fail. Only the parts I highlighted for you should be edited at all:
Quote// database configuration
define('PHPBB_DB_NAME', 'phpBB'); // The name of the database used by the board
define('PHPBB_BD_HOST', 'localhost'); // The name of the database server
define('PHPBB_DB_USERNAME', 'root'); // The username to use to connect to the database
define('PHPBB_DB_PASSWORD', 'your_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', '/phpBB2/');
// 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);
In your particular case, this should be
// database configuration
define('PHPBB_DB_NAME', 'village_nuke'); // The name of the database used by the board
define('PHPBB_BD_HOST', 'localhost'); // The name of the database server
define('PHPBB_DB_USERNAME', '****'); // 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', '/nuke/');
// 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);
- all you'll have to do is replace the asterisks with your actual db username and password. I find it strange though to name the bulletin board folder "nuke" :-\\
Joachim
Thanks, Joachim. You've been so patient with me. Sorry, as stated in other threads, I don't even know any HTML! :o
After changing the codes correctly, I received this error:
QuoteCoppermine critical error:
Unable to connect to phpBB Board database !
MySQL said: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
I also tried changing the path but that didn't work. It may be the wrong path. I'll keep looking.
Sorry for be so techie-defficient but my tech has been swamped and I'm having to pick things up.
Here is the fixed file just in case you need it.
are you sure that your database name is actually "village_nuke" - in my opinion this would be a silly name for a database. If you're not sure what to enter, ask your webhost.
Got it reinstalled.
Along with the index, i'm getting this error on top:
QuoteNotice: Constant PHPBB_LOGOUT_GET already defined in /hsphere/local/home/villagec/hmongvillage.com/mystuff/bridge/phpbb.inc.php on line 41
Notice: Constant REDIR1 already defined in /hsphere/local/home/villagec/hmongvillage.com/mystuff/bridge/phpbb.inc.php on line 252
Notice: Constant REDIR2 already defined in /hsphere/local/home/villagec/hmongvillage.com/mystuff/bridge/phpbb.inc.php on line 253
Notice: Constant LOGIN_REDIR already defined in /hsphere/local/home/villagec/hmongvillage.com/mystuff/bridge/phpbb.inc.php on line 254
Notice: Constant LOGOUT_FLAG already defined in /hsphere/local/home/villagec/hmongvillage.com/mystuff/bridge/phpbb.inc.php on line 255
Attached is phpbb.inc.php
:o
Also, when i go in to login, i'm getting this error:
QuoteNot Found
The requested URL /forum/login.php was not found on this server.
Apache/1.3.31 Server at hmongvillage.com Port 80
1) Turn off notices display in coppermine's config, they're only meant for developers
2) Your forum is not located at http://www.hmongvillage.com/forum/, so the "404 error" is expected behaviour
3) Are you trying to install coppermine into a nuke portal? Well, you can't! The url http://www.hmongvillage.com/ redirects to http://www.hmongvillage.com/nuke/index.php, which is some nuke clone (not sure which one, as you removed reference to the maker, which is not nice)
4) "Got it reinstalled": what did you get reinstalled?
5) No offense meant, but imo this whole stuff is really to hard for you - you don't seem to know the very basics of web page building. You should consider hiring someone to get the job done.
Sorry for making things difficult.
I deleted the folders and database. From there, I reinstalled everything from the beginning.
I'm getting the same error:
Notice: Constant PHPBB_LOGOUT_GET already defined in /hsphere/local/home/villagec/hmongvillage.com/mystuff/bridge/phpbb.inc.php on line 41
Notice: Constant REDIR1 already defined in /hsphere/local/home/villagec/hmongvillage.com/mystuff/bridge/phpbb.inc.php on line 252
Notice: Constant REDIR2 already defined in /hsphere/local/home/villagec/hmongvillage.com/mystuff/bridge/phpbb.inc.php on line 253
Notice: Constant LOGIN_REDIR already defined in /hsphere/local/home/villagec/hmongvillage.com/mystuff/bridge/phpbb.inc.php on line 254
Notice: Constant LOGOUT_FLAG already defined in /hsphere/local/home/villagec/hmongvillage.com/mystuff/bridge/phpbb.inc.php on line 255
Attached is my phpbb.inc file.
those are not error messages, but notices. If you don't understand them, turn them off in coppermine's config (you never should have turned them on in the first place, they're meant for developers only).