[Closed]: phpBB 3 olympus and coppermine 1.4.10 bridge integration - Page 4 [Closed]: phpBB 3 olympus and coppermine 1.4.10 bridge integration - Page 4
 

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

[Closed]: phpBB 3 olympus and coppermine 1.4.10 bridge integration

Started by polle, April 25, 2007, 09:27:33 PM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

Joachim Müller

Please keep in mind that this is not actually a support thread where you just can ask questions. This thread is meant to develop a bridge file for cpg1.4.x and phpbb3. If you're not ready yet to provide the needed data or if you haven't understood the concept behind bridging, please stay out of this thread and wait untill the bridge file is mature/stable enough to be used by everyone. If you want to test it and report your results here, that's fine. But please make sure to have read the bridging section of the documentation extra thoroughly. It is very important as well that you do exactly as suggested in the sticky thread on this board "When requesting bridge support - mandatory!" (being covered in the documentation as well: "Integrating the script with your bulletin board" -> "Bridging support").
For the benefit of the entire community, stay out of this thread unless you have something to say, and you're capable to say it in a manner that will help others to spot your issues or issues that the existing beta bridge may still have.

This being said, I want to say a big "thank you" to Andre for his efforts to come up with a bridge file and the work he has done so far.

Joachim

andre_f

I think you haven't set up the cookie name correctly (I think).

Please check the 'cookie_name' value of phpbb3's configuration table and enter that value as 'cookie_prefix' in coppermine's bridge configuration table.
I think it would be helpful if you post both values here.

gtk

Quote from: andre_f on July 27, 2007, 08:28:04 PM
@gtk: have you read the prior posts in detail? Are you using RC3 of phpbb3? Are you using post based groups? However, try to access the groupmanager and have a look at the groups there. Calling the manager forces rebuilding the group table, that could possibly solve your problem.
Yes, I read, and went back and re-read again.

I am using RC3, and post based groups (1).

My problem is I cannot access any admin pages, so I could not bring up the groupmgr page.  So I commented out the "if (!GALLERY_ADMIN_MODE) " in groupmgr.php, and then resync'd the groups as suggested.  This still did not work.

Again, I am logged in, but it is not recognizing me as "admin".

The only thing I see  that looks incorrect, is in my phpbb3_groups table, the "GROUP_TYPE" for "ADMINISTRATORS" is "3", which is the same for all the other standard delivered groups.   With that in mind, I did update  the code:
$this->admingroups = array($BRIDGE['admin_group'], 3);


Any ideas?

gtk

Coppermine is seeing my id as an Administrator.  WHen I pull up my  ID under "users" it shows:

Administrators
Global_moderators
Registered

andre_f

Hello GTK,

are you sure about the 3 as value for Admin Groups? Normally phpbb3 installs administrator group with a value of 5?!
Maybe that this is the problem?

What does coppermine say if you click the group manager button?

Joachim Müller

Quote from: GauGau on July 29, 2007, 10:34:45 AM
It is very important as well that you do exactly as suggested in the sticky thread on this board "When requesting bridge support - mandatory!"
Can't spot the posting where you did as I suggested.

andre_f

Thanks GauGau,

but I think that the informations requested there won't help solving the last posted problem.

@GTK:

I forgot something: if it is the case that your one and only admin group is configured having the id '3', please don't append it to the classes admingroups variable, but configure this group in coppermine's bridge configuration table as '3'. Otherwise it shows you as admin but assigns yourself to the group id from this table, so you won't have admin rights so far.

Due to this and some prior posts I suggest all other enquires to make sure having filled the bridge configuration table of your coppermine database as described before - this should save a lot of time and solve the most problems.

andre_f

@GauGau: sorry, I've read the larger prior post only now.

If it isn't wanted here, is there another place to post the question from the others here? Some of them helped me fixing some issues in the bridge file.

Joachim Müller

Quote from: andre_f on July 30, 2007, 08:01:52 AM
but I think that the informations requested there won't help solving the last posted problem.
Maybe not in this particular case. But it will help sorting out people who legitimately try your new beta bridge and do everything right from people who just don't know how to apply the bridge in the first place. If users do as suggested there, you can take a look at things for yourself (does the bridging stick in the first place). The sticky thread I refered to exists because in our years of experience with supporting bridging issues it has turned out that having the requested information available helps troubleshooting 99% of all bridging issues. There's little point if you (as bridge contributor) tell people the opposite of what we tell users, as users will take your word. Make the suggested information mandatory to obtain valid reports. This will make test reports more valuable to help you come up with a stable bridge. You should really trust me on this issue - I have been around here very long already.

Joachim

gtk

Quote from: GauGau on July 30, 2007, 07:33:39 AM
Can't spot the posting where you did as I suggested.
@GauGau,  The install I am working on is a test database on my  home linux computer.  I am NOT posting a link & id/passwd to to my home setup.   Even if I did, the IP changes constantly.  If that is mandatory, I will just wait till someone else encounters, or I fix it myself.   Sorry.

I am running coppermine 1.4.10 & phpBB3.RC3

@andre_f
When I look at my phpbb3_groups  table via SQL, it is shows ADMINISTRATORS as group type '5'.   I think I know why though.   I did a "convert" on an existing board (2.x).  Also, I had three groups that I had created in the prior board, and it converted those as well.
group_type   group_name
0   PhotoAlbum
1   Moderators
2   Frequent Posters
3   GUESTS
3   REGISTERED
3   REGISTERED_COPPA
3   GLOBAL_MODERATORS
3   ADMINISTRATORS
3   BOTS

I will re-convert, but this time I will delete my groups prior to converting.

Thx!

andre_f

Hello gtk,

the group_type is NOT the group_id, which is still wanted here.
I checked the group tables on different phpbb3 installations (some upgraded from further versions), and in every installation the group_id's for built-in groups (those having group_type set to 3) are the same.

Enter the group_id of your ADMINISTRATOR group (I'm sure it is 5) in the bridge configuration table as 'admin_group'.
If you want having your moderators or others, than you can APPEND their group_id's to the $this->admingroups array.

gtk

Sorry for the confusion.  the group id from the phpbb_groups table is below:

group_id   group_type   group_name
93             0                  PhotoAlbum
268            1                  Moderators
538            2                  Frequent Posters
539            3                  GUESTS
540            3                  REGISTERED
541            3                  REGISTERED_COPPA
542            3                  GLOBAL_MODERATORS
543            3                  ADMINISTRATORS
544            3                  BOTS

Is this the group_id  your inquiring?

gtk

I edited the phpbb3.inc.php file, and changed the line:

$this->admingroups = array($BRIDGE['admin_group'], 5);

to match my group_id for admins.   This has seemed to fix the problem.   Why my phpbb3_groups table differs from everyone elses, I have no idea   :-\   , but that is not a question for this board.

Thanks so much for your assistance.

WheelGuy

Quote from: gtk on July 30, 2007, 04:40:38 PM
to match my group_id for admins.   This has seemed to fix the problem.   Why my phpbb3_groups table differs from everyone elses, I have no idea   :-\   , but that is not a question for this board.

Thanks so much for your assistance.
My "live" forum is like yours, with different id numbers. The one one my local machine is as andre_f mentions though. Just so you don't "feel" as if you are strange.. lol

ontherack

Thanks for the bridge file, unfortunately i too am having trouble getting it to work, i am using a fresh install of phpbb3 rc3, with a bit of fiddling i seem to have come close a few times but now things seem to have gone backwards, i get the following error once bridging is enabled,

While executing query "SELECT COUNT(*) FROM `ontherac_global`.phpbb_users" on 0

from gallery/include/functions.inc.php

no error details are returned, and i get the feeling that this means access to the database is completely failing, i have tried fresh installs of the bridge and it makes no difference, i have also tried specifying the db credentials in cpg_bridge which made no difference either.
any thoughts? im sure its something small that i cant see.

A few things i figured out too, i was getting an error where a query was looking for records with single_user=0 where this column didnt exist in my db, overriding standard groups in cpg_bridge solved this.
An error i was stuck on just before this was another query which was something along the lines of "where userid= and groupid=5" ie there was no value to the right of the =
all these errors were occuring immediately upon trying to load gallery after enabling bridging. Unfortunately i dont have the exact errors, anyone else getting these?

@GauGau sorry to clog this thread  :(, but my setup is using a clean install of cpg and phpbb3 so im sure others are getting these problems and hope by reporting them that we can come up with a finished bridge. Maybe the thread should be split or moved until a 100% working bridge is available

Joachim Müller

Quote from: gtk on July 30, 2007, 02:49:04 PM
@GauGau,  The install I am working on is a test database on my  home linux computer.  I am NOT posting a link & id/passwd to to my home setup.   Even if I did, the IP changes constantly.  If that is mandatory, I will just wait till someone else encounters, or I fix it myself.
None of your replies is valid. DynDNS is an option for changing IP addresses. Free webhosting is an option for obtaining publicly available testing web space without cost. I'd love to see you test and evaluate the beta bridge, but imo you don't have the minimum requirements that I outlined previously.

Quote from: gtk on July 30, 2007, 02:49:04 PM
I am running coppermine 1.4.10
Then you don't qualify as a valid tester. It's mandatory to run the most recent version (cpg1.4.12 currently) - why should we bother with issues that may be caused by outdated versions? Eliminate uncertainties when evaluating beta software.

Quote from: ontherack on July 30, 2007, 05:47:45 PM
@GauGau sorry to clog this thread  :(, but my setup is using a clean install of cpg and phpbb3 so im sure others are getting these problems and hope by reporting them that we can come up with a finished bridge.
That's wrong: I posted above what a valid report must contain. You have completely failed to read it, so you're not a valid tester. There is no such thing as a default/clean install. Setups differ, that's why it's mandatory to do as suggested and post information about your setup.

Quote from: ontherack on July 30, 2007, 05:47:45 PMMaybe the thread should be split or moved until a 100% working bridge is available
No need to split it. Just read it before replying to it. It clearly says who the target audience of this beta bridge is, what the requirements are for posting and that this thread doesn't fall into the support category. If you can't play by the rules, then stay out of this thread.

From now on I'll delete all irrelevant/invalid replies in this thread without further notice to keep the thread usable. If you have something to say, say it properly. If not, then STFU and wait for a stable release.

Joachim

andre_f

Thanks to GauGau for this post, I hope this prevents from further posting about errors caused by ignoring the concept (or not reading the posts in detail).

@gtk: Ok, although I don't know how this can be because I even updated from a further phpbb version, but if your groups have another id's this no problem. But it isn't a good idea changing the code without having the bridge configuration concept used. May be I didn't understand what you've done, but the code line '$this->admingroups($BRIDGE['admin_group'])' should have the first value of this array unchanged, because the admin's group_id has to be entered in the bridge configuration table. (in your case this tables entree named 'admin_group' has to have a value of '543'). If you done it this, way, forget this paragraph.

@ontherack: None of this queries came from the bridge. Although I was sure about this, I checked both the udb base class and the phpbb3 bridge file for queries using 'single_user' or a combination of 'user_id' and 'group_id' in the way you specified - and found nothing. Please check you are using the right bridge file and having the bridge configuration table filled as posted some posts before.


Bembi

Some testing reports.

1. System: Clean installation CPG 1.4.12 + pgpBB 3 RC4 (MySQL 4.1.22 with MySQL Client API 5.0.22, PHP 5.2.0) 

All done steps:
- Copied the latest bridge file phpbb3.inc.php into the \bridge directory
- Added a section to bridgemgr.php to recognize the new bridgefile
  (I copied the phpbb22 section (line 419 to 430) and changed 'full_name' to "phpBB 3.0' and 'short_name to "phpBB3"
- I started the bridge manager and setup the bridge (with post based groups enabled)
- I startet phpMyAdmin and changed the following fields within the 'cpg_bridge' Table
  'full_formum_url' : added the trailing slash to the path name
  'cookie_prefix'   : set to the value of the field 'cookie_name' from the 'phpBB3_config' table 
  'guest_group'    : set to the value of the corresponding 'group_id' field of the 'phpBB3_groups' table
  'member_group' : set to the value of the corresponding 'group_id' field of the 'phpBB3_groups' table
  'admin_group'    : set to the value of the corresponding 'group_id' field of the 'phpBB3_groups' table

Coppermine runs fine, shows all my phpBB groups and users and I can assign right to them.

2. System: Copy of life system with CPG 1.4.9 + modded phpBB 2.022 (MySQL 4.0.24 with MySQL Client API 3.23.58, PHP 4.4.7)

All done steps:
- Updated the cpg version from 1.4.9 to 1.4.12
- Installed a new installation of phpBB3 RC4 beside the existing
- Started the migration assistant from phpBB3, which copies the content into new tables
- followed the steps, as describes above.

Also this installation runs fine, shows all my phpBB groups and users and I can assign rights to them.

Some minor lacks, which I can see are the following:
- The default installation shows no BOTS (group_id = 6), the migrated installation does (group_id = 22)
- The Group description within CPG is not exacly the same than in pbpBB (case is different)
  A group called 'HTC-BClub' is shown as 'Htc-bclub' in Coppermine.

The migration assistant of phpBB adds the default system groups at the end of the table.
My migrated groups are:
GUEST = 17
ADMINISTRATORS = 21

My migrated users have the following IDs:
Anonymous (ID = 1, Group_ID = 17, Usertype = 2)
Admin (ID = 2, Group_ID = 21, Usertype = 3)

Users have user_type 0 and 1
Anonymous and BOTS have user_type 2
Admins have user_type 3

As the current bridge is working with default IDs and coppermine also seems to work with some IDs from the database, it seem not to be reliable to use the IDs as single identifier.

Assuming, that the anonymous and first admin account are allways the first accounts in phpBB, the following rule may be a way, to find out the correct group_IDs:

- Anonymous account has user_ID = 1, the group_ID value points to the GUEST group
- the first Admin account has user_ID = 2 and the user_type = 3, the group_id points to the ADMINISTRATORS group
- BOTS have the user_type=2 and NOT the user_ID=1 (which is the guest account).

Hope this helps.   

andre_f

Hello Bembi,

thank you very much for this helpful testing.

Although you've done a good work, using the 'user_type' won't help, because this type has the following definition:

0 - normal user
1 - inactive user
2 - ignored user
3 - founder

An admin can have a 'user_type' of 3 as well as 0 (this is the case if you have more than one admin and only one of them has a founder status). This means, too, that a user can have a founder status...

I suggest two ways for migrated systems.
The first would be to add two configurations to the bridge configuration table named:
'guest_group_id' = [id of guest group]
'bot_group_id' = [id of bot group]

and to change the following lines in bridge class constructor:


    $this->guestgroup = 1;
    $this->botgroup = 6;


into


    $this->guestgroup = $BRIDGE['guest_group_id'];
    $this->botgroup = $BRIDGE['bot_group_id'];


The second would be to hardcode this, which isn't a good idea.


gtk

When I was in coppermine, and clicked a username to view the profile, it was always defaulting to the same userid (in my case, 2).

I changed the phpbb3.inc.php bridge file from this

//  function view_profile()
  {
    global $USER_DATA;
    $this->redirect("memberlist.php?mode=viewprofile&sid={$this->sid}&u={$uid}");
  }

to this:

  function view_profile($uid)
  {
    global $USER_DATA;
    $this->redirect("memberlist.php?mode=viewprofile&sid={$this->sid}&u={$uid}");
  }


This seems to work for me now.