coppermine-gallery.com/forum

Support => cpg1.3.x Support => Older/other versions => cpg1.3 (BBS) Integration / Bridging => Topic started by: DiZaRkY on February 02, 2005, 06:02:33 AM

Title: login/logout problems, phpbb2
Post by: DiZaRkY on February 02, 2005, 06:02:33 AM
whenever i try to login from the coppermine page, it'll go to the forums login, then when you click submit, it'll send you to a page that doesn't exist. asnd if you try logging out from the coppermine page, it'll also send you to a page that doesn't exist, and it wont log you out, even though it will log you in if you go though the coppermine login, but it still goes to a non-existant page.

http://thevergeyouth.com/gallery/
test account:
username - test
password - test
Title: Re: login/logout problems, phpbb2
Post by: CapriSkye on February 02, 2005, 07:31:45 AM
after login out it's pointing to http://forums.thevergeyouth.com/gallery and your gallery is at http://thevergeyouth.com/gallery
i'm not familiar with phpbb's set up, but double check on your path might help
Title: Re: login/logout problems, phpbb2
Post by: Tranz on February 02, 2005, 07:51:53 AM
I think that's why you're told that the gallery and forums cannot be on different subdomains. The forums has its own subdomain, which essentially makes them different subdomains.
Title: Re: login/logout problems, phpbb2
Post by: Joachim Müller on February 02, 2005, 08:46:26 AM
try setting the cookie domain to .thevergeyouth.com in your bbs setup (mind the dot at the beginning!).

Joachim
Title: Re: login/logout problems, phpbb2
Post by: DiZaRkY on February 02, 2005, 11:58:31 PM
well, i did the cookie thing, and when logging in or logging out, it's still showing pages that can't be shown, but it displays the proper urls.
like when logging in, it gives me:
http://thevergeyouth.com/forums/login.php

which is right, but that page wont load, even though if i go back to the coppermine page or the forums, i'm logged in.
Title: Re: login/logout problems, phpbb2
Post by: Joachim Müller on February 03, 2005, 09:04:43 AM
you have to decide: is it http://thevergeyouth.com/forums/login.php or http://forums.thevergeyouth.com/login.php ? You either use a sub-domain or sub-folders - not both. Something is fishy with your cpgredir.php file, post it here please, together with your changes to the bridge file (making sure to replace the password with asterisks).

Joachim
Title: Re: login/logout problems, phpbb2
Post by: DiZaRkY on February 03, 2005, 09:33:07 PM

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;

?>



phpbb.inc

// database configuration
define('PHPBB_DB_NAME', 'theverg_phpbb2'); // The name of the database used by the board
define('PHPBB_BD_HOST', 'localhost'); // The name of the database server
define('PHPBB_DB_USERNAME', 'theverg_phpbb2'); // 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', 'phpbb2_'); // 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
Title: Re: login/logout problems, phpbb2
Post by: CapriSkye on February 03, 2005, 11:36:24 PM
as mentioned in the doc, having http://forums.yourdomain.com/ won't work
http://coppermine.sourceforge.net/manual.php#integrating
you can try change your forums address to http://yourdomain.com/forums
Title: Re: login/logout problems, phpbb2
Post by: Bacchus on February 04, 2005, 06:04:37 AM
Hi!

I'm new on this forum and you need to know that my main language is french, so sorry if my writing english is poor. :-[

I have the same/similar problem, i'm unable to login/logout in Coppermine.

First of all:

My forum: http://users.rockweb.org/Isolder/phpBB2/index.php

My gallery: http://users.rockweb.org/Isolder/galerie/index.php

Now, if i connect myself in mt forum then manually change the address to go in the gallery. The login works! Same for logout. However, in Coppermine, login leads me to that page:

http://users.rockweb.org/Isolder/galerie/login.php?referer=%2FIsolder%2Fgalerie%2Findex.php

God knows why!

Now here's my integration files:

phpbb.inc.php:
// database configuration
define('PHPBB_DB_NAME', 'Isolder'); // The name of the database used by the board
define('PHPBB_BD_HOST', 'localhost'); // The name of the database server
define('PHPBB_DB_USERNAME', 'Isolder'); // The username to use to connect to the database
define('PHPBB_DB_PASSWORD', 'xxxxxx'); // 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', 'Isolder/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);


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


and I did make the correct modification in the file init.inc.php

Notice that everything else in Coppermine works well!

Can someone help me? Thanks!  ;D

EDIT: By the way, when i've test everything in local with Easyphp 1.7, all work like a charm! I've just uploaded the same files i was using locally therefore i've had to do some chmod and delete the install.lock file. But the mysql table where all new, i did'nt use the ones use locally.
Title: Re: login/logout problems, phpbb2
Post by: Nibbler on February 04, 2005, 02:35:23 PM
You need a forward slash at the start of the phpbb_web _path.
Title: Re: login/logout problems, phpbb2
Post by: Bacchus on February 04, 2005, 04:24:18 PM
Thanks!

I hate it when tiny-winy-minor-glish mess up everything! >:(