MOSPlus (Mambo w/PHPBB) phpbb bridge / login issues MOSPlus (Mambo w/PHPBB) phpbb bridge / login issues
 

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

MOSPlus (Mambo w/PHPBB) phpbb bridge / login issues

Started by moriyah, September 15, 2005, 10:11:12 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

moriyah

I hope I can get some help here. I am using Mosplus which is basically phpbb integrating with Mambo for login purposes. I'm attempting to bridge Coppermine and I am having some problems. From looking at these support forums I can see that it might be some sort of a cookie issue. But it looks like I am doing everything correct. :-\\

I'm having the same issue many of the other users here had. The standalone install worked perfectly, and the bridge appears to have worked perfectly. Yet when I go to log in, and i log in at the forums, it redirects me back to the gallery and I remain logged out.

Here is my phpbb.inc.php:
// database configuration
define('PHPBB_DB_NAME', 'db_name'); // The name of the database used by the board
define('PHPBB_BD_HOST', 'myhost'); // The name of the database server
define('PHPBB_DB_USERNAME', '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', '/site/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', 'transite'); // The prefix used for board cookies

// Prefix and names for the database tables
define('PHPBB_TABLE_PREFIX', ''); // The prefix used for the DB tables
define('PHPBB_USER_TABLE', 'mos_users'); // The members table
define('PHPBB_SESSION_TABLE', 'mos_session'); // The session table
define('PHPBB_GROUP_TABLE', 'phpbb_groups'); // The groups table
define('PHPBB_UGROUP_TABLE', 'phpbb_user_group'); // The group/user table


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


In my forums config I have:
Cookie Name: transite_phpbb
Cookie Path: /

In Coppermine config:
Cookie Name: cpg133
Cookie Path: /

Debug:
USER:
------------------
Array
(
    [ID] => aea8fd3322b2638f6fc1b8add7b0a82f
    [am] => 1
    [liv] => Array
        (
            [0] => 7
            [1] => 6
            [2] => 8
            [3] => 2
            [4] => 4
        )

    [sort] => ta
)

==========================
USER DATA:
------------------
Array
(
    [disk_max] => 0
    [disk_min] => 0
    [can_rate_pictures] => 1
    [can_send_ecards] => 0
    [ufc_max] => 0
    [ufc_min] => 0
    [custom_user_upload] => 0
    [num_file_upload] => 5
    [num_URI_upload] => 3
    [can_post_comments] => 0
    [can_upload_pictures] => 0
    [can_create_albums] => 0
    [has_admin_access] => 0
    [pub_upl_need_approval] => 1
    [priv_upl_need_approval] => 1
    [group_name] => Anonymous
    [upload_form_config] => 0
    [group_quota] => 0
    [can_see_all_albums] => 0
    [group_id] => 3
    [groups] => Array
        (
            [0] => 3
        )

)

==========================
Queries:
------------------
Array
(
    [0] => SELECT extension, mime, content FROM cpg_filetypes;
    [1] => SELECT user_id, username as user_name, user_level FROM `mambo_community`.mos_users WHERE user_id='0' AND user_password='*' AND user_active='1'
    [2] => SELECT MAX(group_quota) as disk_max, MIN(group_quota) as disk_min, MAX(can_rate_pictures) as can_rate_pictures, MAX(can_send_ecards) as can_send_ecards, MAX(upload_form_config) as ufc_max, MIN(upload_form_config) as ufc_min, MAX(custom_user_upload) as custom_user_upload, MAX(num_file_upload) as num_file_upload, MAX(num_URI_upload) as num_URI_upload, MAX(can_post_comments) as can_post_comments, MAX(can_upload_pictures) as can_upload_pictures, MAX(can_create_albums) as can_create_albums, MAX(has_admin_access) as has_admin_access, MIN(pub_upl_need_approval) as pub_upl_need_approval, MIN( priv_upl_need_approval) as  priv_upl_need_approval FROM cpg_usergroups WHERE group_id in (3)
    [3] => SELECT group_name FROM  cpg_usergroups WHERE group_id= 3
    [4] => DELETE FROM cpg_banned WHERE expiry < '2005-09-15 01:02:53'
    [5] => SELECT * FROM cpg_banned WHERE ip_addr='71.105.153.114' OR ip_addr='71.105.153.114' OR user_id=0
    [6] => SELECT aid FROM cpg_albums WHERE visibility != '0' AND visibility !='10000' AND visibility NOT IN (3)
    [7] => SELECT cid, name, description, thumb FROM cpg_categories WHERE parent = ''  ORDER BY pos
    [8] => SELECT aid FROM cpg_albums WHERE category = 2
    [9] => SELECT count(*) FROM cpg_pictures as p, cpg_albums as a WHERE p.aid = a.aid AND category = 2
    [10] => SELECT cid, name, description, thumb FROM cpg_categories WHERE parent = '2'  ORDER BY pos
    [11] => SELECT aid FROM cpg_albums as a WHERE category>=10000
    [12] => SELECT count(*) FROM cpg_pictures as p, cpg_albums as a WHERE p.aid = a.aid AND category >= 10000
    [13] => SELECT aid FROM cpg_albums WHERE category = 3
    [14] => SELECT count(*) FROM cpg_pictures as p, cpg_albums as a WHERE p.aid = a.aid AND category = 3
    [15] => SELECT aid FROM cpg_albums as a WHERE category = '0'
    [16] => SELECT count(*) FROM cpg_albums as a WHERE 1
    [17] => SELECT count(*) FROM cpg_pictures as p LEFT JOIN cpg_albums as a ON a.aid=p.aid WHERE 1
    [18] => SELECT count(*) FROM cpg_comments as c LEFT JOIN cpg_pictures as p ON c.pid=p.pid LEFT JOIN cpg_albums as a ON a.aid=p.aid WHERE 1
    [19] => SELECT count(*) FROM cpg_categories WHERE 1
    [20] => SELECT sum(hits) FROM cpg_pictures as p LEFT JOIN cpg_albums as a ON p.aid=a.aid WHERE 1
    [21] => SELECT count(*) FROM cpg_albums as a WHERE category = '0'
    [22] => SELECT COUNT(*) from cpg_pictures WHERE approved = 'YES'
    [23] => SELECT pid, filepath, filename, url_prefix, filesize, pwidth, pheight, ctime, aid, aid FROM cpg_pictures WHERE approved = 'YES'  ORDER BY RAND() LIMIT 8
    [24] => SELECT COUNT(*) from cpg_pictures WHERE approved = 'YES'
    [25] => SELECT pid, filepath, filename, url_prefix, filesize, pwidth, pheight, ctime, aid,title, caption, owner_id, owner_name, aid FROM cpg_pictures WHERE approved = 'YES'  ORDER BY pid DESC  LIMIT 0 ,8
)

==========================
GET :
------------------
Array
(
)

==========================
POST :
------------------
Array
(
)

==========================
Page generated in 0.094 seconds - 26 queries in 0.039 seconds - Album set :


My forums: www.transitionalstate.com/site/forums
Coppermin: www.transitionalstate.com/site/gallery

And you can try logging in yourself at:
username: testuser
password: test

Also, I read that if you have the bridge configured the images and so forth that were uploaded before the bridge are not supposed to be viewable any longer. (??) The images that I uploaded are still there, so I dont know what that means, if anything.

I really appreiciate your help! I really hope I can get this running, im so fustrated trying to make sure all the cookies settings are correct. But im willing to do anything to get this working.

Thanks MUCH.
moriyah

Nibbler

Quotedefine('PHPBB_COOKIE_PREFIX', 'transite'); // The prefix used for board cookies

That's not your cookie prefix, your cookie prefix is 'transite_phpbb'.

moriyah

wow. people weren't kidding when they said you were fast!  ;) Well I changed my phpbb.inc.php and I am now getting an error:

Fatal error :

There was an error while processing a database query.


While executing query "SELECT user_id, username as user_name, user_level FROM `mambo_community`.mos_session INNER JOIN `mambo_community`.mos_users ON session_user_id = user_id WHERE session_id='a2b013b00f028d1dae5161a7ed422acc' AND session_user_id ='2' AND user_active='1'" on 0

mySQL error: Column: 'username' in field list is ambiguous

What exactly does that mean?

thanks so much for your help. Hopefully I can get this running. I should be able to, since others have.

Nibbler

That's looks like the result of the phpbb component being a non-standard phpbb. If you can PM me an FTP login to your site/gallery I can see what changes are required, fix up your bridge, and document them on the forum.

moriyah


Nibbler

Looks like resolving that ambiguous query was all that was needed.

Change was

        $sql = "SELECT user_id, username as user_name, user_level " . "FROM " . $UDB_DB_NAME_PREFIX . PHPBB_TABLE_PREFIX . PHPBB_SESSION_TABLE . " " . "INNER JOIN " . $UDB_DB_NAME_PREFIX . PHPBB_TABLE_PREFIX . PHPBB_USER_TABLE . " ON session_user_id = user_id " . "WHERE session_id='$session_id' AND session_user_id ='$cookie_uid' AND user_active='1'";

to

        $sql = "SELECT user_id, " . PHPBB_TABLE_PREFIX . PHPBB_USER_TABLE . ".username as user_name, user_level " . "FROM " . $UDB_DB_NAME_PREFIX . PHPBB_TABLE_PREFIX . PHPBB_SESSION_TABLE . " " . "INNER JOIN " . $UDB_DB_NAME_PREFIX . PHPBB_TABLE_PREFIX . PHPBB_USER_TABLE . " ON session_user_id = user_id " . "WHERE session_id='$session_id' AND session_user_id ='$cookie_uid' AND user_active='1'";

moriyah

thank you so much! I can't tell you how much a blessing and help you were. ;D