Bridging works for admin only Bridging works for admin only
 

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

Bridging works for admin only

Started by justal, February 07, 2007, 11:25:40 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

justal

I've tried setting up Coppermine 1.4.10 to bridge with XMB 1.9.6, the bridging works fine for adminsitrators, but not for any other members.... Other members appear to be logged out when they go to Coppermine but remain logged in when the return to the XMB forums.

I have the following issue when trying to bridge coppermine and XXX:
[error message here]

Coppermine install: http://www.aber-cachers.co.uk/gallery/
Forum install: http://www.aber-cachers.co.uk/forum/forum_index.php
Coppermine version: cpg1.4.10
Forum version: XMB 1.9.6
Test user account: Test / testing

BridgeManager settings:
Forum URL:  http://www.aber-cachers.co.uk/forum
Relative path to your BBS's config file:  ../forum/
Use post-based groups?:  0
Cookie name/preifx (if applicable)

Any suggestions?
Cheers.
Al.

phill104

Hi Al,

I had the same problem on one of my sites. Luckilly for me the forum software needed updating and once I did that and re applied the bridge all worked fine.

On your site I initially tried to use the register button on the gallery but it is trying to pull up the gallery register.php file instead of the  forum one. I can successfully register and login from the forum but it does not log me into the gallery. It looks like the database tables have been bridged but some of the pointers to the login scripts have failed.

What mods have you applied to the forum and gallery?

p.s. I'll be up your way soon for a sail. I'm sure you will be on the water if it's windy, I'll look out for you.
It is a mistake to think you can solve any major problems just with potatoes.

justal

Hi Phil..... Fancy seeing you here!

I haven't applied any mods to either the forums or the gallery (yet).

I hadn't tried registering from the gallery, but as you say, the link points to gallery/register.php which then gets redirected to forum/register.php which doesn't exist, so registration from the gallery isn't working.... I shall have to look into that.

When I'm logged in as an administrator I stay logged in from forum to gallery and vice versa, so the bridging is working to a certain extent, but it doesn't work for non-administrator members which seems a little strange?

Anyone else any ideas?

Al.

P.S. Phil... If its windy you won't need to twist my arm too hard! :)

justal

Just an update...

i've fixed the problem with registering from within the gallery....

I amended brige/xmb.inc.php

changing line 102 from
$this->page = array(
'register' => '/register.php',
'editusers' => '/misc.php?action=list',
'edituserprofile' => '/member.php?action=viewpro&member='
);



to

$this->page = array(
'register' => '/member.php?action=coppa',
'editusers' => '/misc.php?action=list',
'edituserprofile' => '/member.php?action=viewpro&member='
);



That doesn't however fix the main problem that users other than admins don't get logged into the galleries.

Al.

Nibbler

I'll check the bridge file after work. Bump the thread if I forget.

justal

Not sure how you bump a thread, but hopefully this reply will do the trick?

Al.

Nibbler

Bridge is working fine. There is a cookie fix you need to make to xmb's code for bridging to be possible. This has been posted on the boards before but it is not in the manual.


/*

Cookie fix (if your board is not installed to site root):

functions.php,

find put_cookie function definition (c. line 1414) and add

$path = '/';

just inside the top of the function

*/

justal

I'd already made the fix, so it wasn't that.

I've since made a completely fresh install of both XMB and Coppermine on a separate test server and the same issue has arisen there... Bridging works perfectly for admins but not for other members.... What could cause this, as presumably the fact that it works for admins means that all my cookie settings etc are correct?

Al.

Nibbler

Can you post the debug output you get when visiting the gallery while logged in to xmb as a normal user?

Also does switching 'post based groups' on or off have any effect?

justal

Thanks Nibbler...

Turning Post Based Groups on doesn't make any difference. Here is the Debug output when logged into XMB as a normal user:

USER:
------------------
Array
(
    [ID] => d8e98adea3956feae118de5140fe9647
    [am] => 1
    [lang] => english
    [liv] => Array
        (
        )

)

==========================
USER DATA:
------------------
Array
(
    [user_id] => 0
    [user_name] => Guest
    [groups] => Array
        (
            [0] => 3
        )

    [group_quota] => 0
    [can_rate_pictures] => 1
    [can_send_ecards] => 0
    [can_post_comments] => 0
    [can_upload_pictures] => 0
    [can_create_albums] => 0
    [pub_upl_need_approval] => 1
    [priv_upl_need_approval] => 1
    [upload_form_config] => 0
    [num_file_upload] => 5
    [num_URI_upload] => 3
    [custom_user_upload] => 0
    [disk_max] => 0
    [disk_min] => 0
    [ufc_max] => 0
    [ufc_min] => 0
    [has_admin_access] => 0
    [group_name] => Guests
    [can_see_all_albums] => 0
    [group_id] => 3
)

==========================
Queries:
------------------
Array
(
    [0] => SELECT extension, mime, content, player FROM cpg1410_filetypes; (0s)
    [1] => select * from cpg1410_plugins order by priority asc; (0s)
    [2] => SELECT * FROM cpg1410_bridge (0s)
    [3] => SELECT uid AS user_id FROM `cachers_cachers`.xmb_members WHERE username  = 'Robbie' (0s)
    [4] => SELECT u.uid AS id, u.username AS username, u.password AS password, u.status+100 AS group_id FROM `cachers_cachers`.xmb_members AS u INNER JOIN `cachers_cachers`.xmb_ranks AS g ON u.status=g.title WHERE u.uid='12' (0s)
    [5] => 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 cpg1410_usergroups WHERE group_id in (3) (0s)
    [6] => SELECT group_name FROM  cpg1410_usergroups WHERE group_id= 3 (0s)
    [7] => DELETE FROM cpg1410_banned WHERE expiry < '2007-02-08 20:12:12' (0s)
    [8] => SELECT * FROM cpg1410_banned WHERE (ip_addr='80.229.175.114' OR ip_addr='80.229.175.114' OR user_id=0) AND brute_force=0 (0s)
    [9] => SELECT aid FROM cpg1410_albums WHERE visibility != '0' AND visibility !='10000' AND visibility NOT IN (3) (0s)
    [10] => SELECT aid FROM cpg1410_albums (0s)
    [11] => SELECT cid, name, description, thumb FROM cpg1410_categories WHERE parent = ''  ORDER BY pos (0s)
    [12] => SELECT aid FROM cpg1410_albums as a WHERE category>=10000 (0s)
    [13] => SELECT count(*) FROM cpg1410_pictures as p, cpg1410_albums as a WHERE p.aid = a.aid AND approved='YES' AND category >= 10000 (0s)
    [14] => SELECT cid, name, description, thumb FROM cpg1410_categories WHERE parent = '1'  ORDER BY pos (0s)
    [15] => SELECT aid FROM cpg1410_albums WHERE category = 2 (0s)
    [16] => SELECT count(*) FROM cpg1410_pictures as p, cpg1410_albums as a WHERE p.aid = a.aid AND approved='YES' AND category = 2 (0s)
    [17] => SELECT count(*) FROM cpg1410_albums as a WHERE category = '2' (0s)
    [18] => SELECT a.aid, a.title, a.description, visibility, filepath, filename, url_prefix, pwidth, pheight FROM cpg1410_albums as a LEFT JOIN cpg1410_pictures as p ON a.thumb=p.pid WHERE category=2 ORDER BY a.pos LIMIT 0,4 (0s)
    [19] => SELECT a.aid, count( p.pid )  AS pic_count, max( p.pid )  AS last_pid, max( p.ctime )  AS last_upload, a.keyword FROM cpg1410_albums AS a  LEFT JOIN cpg1410_pictures AS p ON a.aid = p.aid AND p.approved =  'YES' WHERE a.aid IN (1, 2, 3, 4)GROUP BY a.aid (0s)
    [20] => SELECT count(pid) AS link_pic_count
                      FROM cpg1410_pictures
                        WHERE aid != 1 AND
                        keywords LIKE '%container%' AND
                        approved = 'YES' (0s)
    [21] => SELECT count(pid) AS link_pic_count
                      FROM cpg1410_pictures
                        WHERE aid != 2 AND
                        keywords LIKE '%local%' AND
                        approved = 'YES' (0s)
    [22] => SELECT count(pid) AS link_pic_count
                      FROM cpg1410_pictures
                        WHERE aid != 3 AND
                        keywords LIKE '%caches%' AND
                        approved = 'YES' (0s)
    [23] => SELECT filepath, filename, url_prefix, pwidth, pheight FROM cpg1410_pictures WHERE pid='15' (0s)
    [24] => SELECT filepath, filename, url_prefix, pwidth, pheight FROM cpg1410_pictures WHERE pid='16' (0s)
    [25] => SELECT filepath, filename, url_prefix, pwidth, pheight FROM cpg1410_pictures WHERE pid='8' (0s)
    [26] => SELECT cid, name, description, thumb FROM cpg1410_categories WHERE parent = '2'  ORDER BY pos (0s)
    [27] => SELECT aid FROM cpg1410_albums WHERE category = 3 (0s)
    [28] => SELECT count(*) FROM cpg1410_pictures as p, cpg1410_albums as a WHERE p.aid = a.aid AND approved='YES' AND category = 3 (0s)
    [29] => SELECT count(*) FROM cpg1410_albums as a WHERE category = '3' (0s)
    [30] => SELECT a.aid, a.title, a.description, visibility, filepath, filename, url_prefix, pwidth, pheight FROM cpg1410_albums as a LEFT JOIN cpg1410_pictures as p ON a.thumb=p.pid WHERE category=3 ORDER BY a.pos LIMIT 0,3 (0s)
    [31] => SELECT a.aid, count( p.pid )  AS pic_count, max( p.pid )  AS last_pid, max( p.ctime )  AS last_upload, a.keyword FROM cpg1410_albums AS a  LEFT JOIN cpg1410_pictures AS p ON a.aid = p.aid AND p.approved =  'YES' WHERE a.aid IN (5, 6, 7)GROUP BY a.aid (0s)
    [32] => SELECT count(pid) AS link_pic_count
                      FROM cpg1410_pictures
                        WHERE aid != 5 AND
                        keywords LIKE '%Aber%' AND
                        approved = 'YES' (0s)
    [33] => SELECT count(pid) AS link_pic_count
                      FROM cpg1410_pictures
                        WHERE aid != 6 AND
                        keywords LIKE '%Wales%' AND
                        approved = 'YES' (0s)
    [34] => SELECT count(pid) AS link_pic_count
                      FROM cpg1410_pictures
                        WHERE aid != 7 AND
                        keywords LIKE '%landscape%' AND
                        approved = 'YES' (0s)
    [35] => SELECT filepath, filename, url_prefix, pwidth, pheight FROM cpg1410_pictures WHERE pid='14' (0s)
    [36] => SELECT filepath, filename, url_prefix, pwidth, pheight FROM cpg1410_pictures WHERE pid='26' (0s)
    [37] => SELECT filepath, filename, url_prefix, pwidth, pheight FROM cpg1410_pictures WHERE pid='9' (0s)
    [38] => SELECT cid, name, description, thumb FROM cpg1410_categories WHERE parent = '3'  ORDER BY pos (0s)
    [39] => SELECT aid FROM cpg1410_albums WHERE category = 4 (0s)
    [40] => SELECT count(*) FROM cpg1410_pictures as p, cpg1410_albums as a WHERE p.aid = a.aid AND approved='YES' AND category = 4 (0s)
    [41] => SELECT count(*) FROM cpg1410_albums as a WHERE category = '4' (0s)
    [42] => SELECT a.aid, a.title, a.description, visibility, filepath, filename, url_prefix, pwidth, pheight FROM cpg1410_albums as a LEFT JOIN cpg1410_pictures as p ON a.thumb=p.pid WHERE category=4 ORDER BY a.pos LIMIT 0,3 (0s)
    [43] => SELECT a.aid, count( p.pid )  AS pic_count, max( p.pid )  AS last_pid, max( p.ctime )  AS last_upload, a.keyword FROM cpg1410_albums AS a  LEFT JOIN cpg1410_pictures AS p ON a.aid = p.aid AND p.approved =  'YES' WHERE a.aid IN (8, 9, 10)GROUP BY a.aid (0s)
    [44] => SELECT count(pid) AS link_pic_count
                      FROM cpg1410_pictures
                        WHERE aid != 8 AND
                        keywords LIKE '%aber-cachers%' AND
                        approved = 'YES' (0s)
    [45] => SELECT count(pid) AS link_pic_count
                      FROM cpg1410_pictures
                        WHERE aid != 9 AND
                        keywords LIKE '%event%' AND
                        approved = 'YES' (0s)
    [46] => SELECT count(pid) AS link_pic_count
                      FROM cpg1410_pictures
                        WHERE aid != 10 AND
                        keywords LIKE '%cachers%' AND
                        approved = 'YES' (0s)
    [47] => SELECT filepath, filename, url_prefix, pwidth, pheight FROM cpg1410_pictures WHERE pid='10' (0s)
    [48] => SELECT filepath, filename, url_prefix, pwidth, pheight FROM cpg1410_pictures WHERE pid='18' (0s)
    [49] => SELECT cid, name, description, thumb FROM cpg1410_categories WHERE parent = '4'  ORDER BY pos (0s)
    [50] => SELECT aid FROM cpg1410_albums WHERE category = 5 (0s)
    [51] => SELECT count(*) FROM cpg1410_pictures as p, cpg1410_albums as a WHERE p.aid = a.aid AND approved='YES' AND category = 5 (0s)
    [52] => SELECT count(*) FROM cpg1410_albums as a WHERE category = '5' (0s)
    [53] => SELECT a.aid, a.title, a.description, visibility, filepath, filename, url_prefix, pwidth, pheight FROM cpg1410_albums as a LEFT JOIN cpg1410_pictures as p ON a.thumb=p.pid WHERE category=5 ORDER BY a.pos LIMIT 0,1 (0s)
    [54] => SELECT a.aid, count( p.pid )  AS pic_count, max( p.pid )  AS last_pid, max( p.ctime )  AS last_upload, a.keyword FROM cpg1410_albums AS a  LEFT JOIN cpg1410_pictures AS p ON a.aid = p.aid AND p.approved =  'YES' WHERE a.aid IN (11)GROUP BY a.aid (0s)
    [55] => SELECT filepath, filename, url_prefix, pwidth, pheight FROM cpg1410_pictures WHERE pid='21' (0s)
    [56] => SELECT cid, name, description, thumb FROM cpg1410_categories WHERE parent = '5'  ORDER BY pos (0s)
    [57] => SELECT aid FROM cpg1410_albums as a WHERE category = '0' (0s)
    [58] => SELECT count(*) FROM cpg1410_albums as a WHERE 1 (0s)
    [59] => SELECT count(*) FROM cpg1410_pictures as p LEFT JOIN cpg1410_albums as a ON a.aid=p.aid WHERE 1 AND approved='YES' (0s)
    [60] => SELECT count(*) FROM cpg1410_comments as c LEFT JOIN cpg1410_pictures as p ON c.pid=p.pid LEFT JOIN cpg1410_albums as a ON a.aid=p.aid WHERE 1 (0s)
    [61] => SELECT count(*) FROM cpg1410_categories WHERE 1 (0s)
    [62] => SELECT sum(hits) FROM cpg1410_pictures as p LEFT JOIN cpg1410_albums as a ON p.aid=a.aid WHERE 1 (0s)
    [63] => SELECT count(*) FROM cpg1410_albums as a WHERE category = '0' (0s)
)

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

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

==========================
Page generated in 0.093 seconds - 64 queries in 0 seconds - Album set : ; Meta set: AND aid IN (1,2,3,4,5,6,7,8,9,10,11) ;

Nibbler

Well, that says the cookies are fine and it recognises you as a user. The problem is that it can't find what group you are in so it treats you as anonymous.  I tested against a clean install of xmb myself so I don't know how your clean install would be working differently. Can you give me FTP access to an affected gallery?

justal


justal

All solved now... The problem was caused by the renaming of user ranks within XMB

Thanks.
Alan.