coppermine-gallery.com/forum

Support => cpg1.3.x Support => Older/other versions => cpg1.3 (BBS) Integration / Bridging => Topic started by: phillyfan088 on September 12, 2005, 06:52:22 AM

Title: Login/Register Links don't work
Post by: phillyfan088 on September 12, 2005, 06:52:22 AM
Hey,

I'm sorry if this is in the wrong forum, but my problem is related to bridging.  My phpbb 2.0.17 is integrated with my coppermine 1.3.4 gallery.  Everything was working fine, but I recently discovered that the "login" and "register" links don't work.  They say that the page cannot be found.  I did upgrade my phpbb board from 2.0.15 to 2.0.17 and I suspect that this might have something to do with my problem.  I have looked all over the place for a possible error but nothing has worked.  Can someone check my photo gallery out and try to find a possible solution?  The test user account "thefan/thefan" (username/password) can be used.  The gallery URL is http://media.philliesfanpage.com.
Thank You. 
Title: Re: Login/Register Links don't work
Post by: phillyfan088 on September 12, 2005, 07:04:42 AM
Here are my scripts:

phpbb.inc.init
// database configuration
define('PHPBB_DB_NAME', '******'); // 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', '/forums/');
// 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', 'phpbb_'); // 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


forums/cpg_redir.php
<?php
if (!$_SERVER['HTTP_HOST']) {
  $cpg_host=$HTTP_SERVER_VARS['HTTP_HOST'];
} else {
  $cpg_host=$_SERVER['HTTP_HOST'];
}
$cpg_path='/gallery';
header("Location: http://".$cpg_host.$cpg_path);
exit;
?>




And I uncommented the phpbb part out in the include file.
Title: Re: Login/Register Links don't work
Post by: Nibbler on September 12, 2005, 07:15:23 AM
Because you are using Coppermine on a subdomain you need to edit the udb_redirect function in the bridge file as follows:

Find:

function udb_redirect($target)
{
   header('Location: http://' . $_SERVER['HTTP_HOST'] . PHPBB_WEB_PATH . $target);
    exit;
}


Change that to


function udb_redirect($target)
{
   header('Location: http://philliesfanpage.com' . PHPBB_WEB_PATH . $target);
    exit;
}


You will also need to hardcode the cpg_redir.php file

<?php
header
("Location: http://media.philliesfanpage.com/");
exit;
?>
Title: Re: Login/Register Links don't work
Post by: phillyfan088 on September 12, 2005, 07:27:41 AM
Thanks so much for the quick reply.  Everything's working fine now.