CPG 1.3 and phpbb 2.0.11 login problems CPG 1.3 and phpbb 2.0.11 login problems
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

CPG 1.3 and phpbb 2.0.11 login problems

Started by T_M, January 08, 2005, 04:46:15 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

T_M

Hi, i've integrated CPG and phpbb, and i can get from gallery to the forum login page etc, but when i log in on the forum and get redirected back to the gallery, i'm not logged in. Then when i try logging in on the gallery again, i get redirected to the forum etc and it's a vicious little circle. I can't figure out what i've done, please could someone help me?

http://ourstuff.afraid.org/gallery
http://ourstuff.afraid.org/forums

user: test
pass: test

Joachim Müller

post the changes in your bridge file (replacing your password with asterisks), you probably set up something wrong there.

Joachim

T_M

// database configuration
define('PHPBB_DB_NAME', 'ourstuff'); // 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', '*******'); // 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', 'phpbb_one'); // 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

Nibbler

Quote from: documentationIf you are using phpBB 2, go to the admin control panel and check that "Cookie domain" corresponds to your domain, "Cookie name" is "phpbb2mysql" and "Cookie path" is "/".

You cookie path is not '/', it is '/forums/'. Bridging cannot work under those conditions.

Joachim Müller

[side note]
Running under the mySQL account "root" is not recommended at all, might be a serious security risk!
[/side note]

Joachim

T_M

thanks guys - greatly appreciated. i'm just gonna try reinstalling the whole thing and hope for the best.

T_M

ok, now when i try logging in from the gallery it takes me to the forum, then when i press login it just gives me a blank white screen, any ideas what this might be?

Nibbler


T_M

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

TheDeJay

#9
Somewhat the same problem, I CAN log in to CPG via link from forum, BUT if i try to click log out in the gallery It just gives me an error I'll not below, and not route me back to the forum as it should, from what I assume is the function of the redirect. ne thoughts?

Everytime i click log out in the picture gallery i get this error message
Warning: Cannot modify header information - headers already sent by (output started at /home/sinfulst/www/www/phpBB2/cpg_redir.php:9) in /home/sinfulst/www/www/phpBB2/cpg_redir.php on line 16

Now I can click back then click log out again on CPG and it will show me the CPG screen telling me I'm not logged in.
I'm just finding it a hassel to have the error message above coming up. Shows the same error in IE, and in Firefox...
Also when I click LOGIN on CPG it does send me to the forum to login but when i submit the info to login i get that same error above as well.

I've numbered the lines in the cpg_redir file code to show where the errors are showing for.

Test ID : test
Test Password: test

Forum: http://www.sinfulstylescc.com/phpBB2/
Gallery: http://www.sinfulstylescc.com/gallery/cpg132/

phpBB2 v 2.0.11
Mysql v 4.0.22

Forum Cookie: phpbb2mysql
Forum Cookie Domain: sinfulstylescc.com
Forum Cookie Path: /

CPG Cookie: phpbb2mysql1
CPG Cookie Domain: sinfulstylescc.com
CPG Cookie Path: /

cpg_redir.php


9-  <?php
10
- if (!$_SERVER['HTTP_HOST']) {
11-  $cpg_host=$HTTP_SERVER_VARS['HTTP_HOST'];
12- } else {
13-   $cpg_host=$_SERVER['HTTP_HOST'];
14- }
15$cpg_path='/gallery/cpg132/';
16header("Location: http://".$cpg_host.cpg_path);
17- exit;
18?>




phpbb.inc.php


// 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', '/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);



init.inc.php


define('COPPERMINE_VERSION', '1.3.2');

// 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');

TheDeJay


Nibbler

I don't understand what you are doing with the cpg_redir file.

TheDeJay

With mine or the other guys...
If dealing with my issue. Whats NOT to understand... I put the error message as to whats gonig on... be more specific as to what you are requesting.

Nibbler

Well you could explain why your file starts at line 9. Most files I am familiar with tend to start at line 1.

TheDeJay

Created as per the install directions from the included files in the cpg package for the integration and bridging.

cpg_redir.php

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
</head>

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

</body>
</html>


Iv'e tried it both ways above and below

<?php
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<
html>
<
head>
<
meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<
title>Untitled Document</title>
</
head>

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

</
body>
</
html>
?>

Joachim Müller

where in the docs does it say to do that?

Joachim


Joachim Müller

it says to add<?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;
?>
, but not<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
</head>

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

</body>
</html>

TheDeJay

as in the other post, I'm moving to CPGnuke :) much more organized. but thanks for info newayz and i see where my problems were as well. thanks for the info AGAIN! :)

jefvhal

I'm having the same problem. I've made an update from phpbb 2.0.10 to 2.0.11 and have no settings changed.
At 2.0.10 everythings worked fine but at 2.0.11 the login wont work from coppermine.

phpbb: http://www.marsuamail.nl/forum
copp: http://www.marsuamail.nl/fotoalbum

user: test
pass: test