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

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 4 Guests are viewing this topic.

Grolley

Redirect is working, everything seems to go well. However, when I do login on a user or admin account, it redirects to CPG and no one is logged in. :/

Grolley

I couldn't edit my above post, maybe I missed the button. Anyways, I get "There was an error while processing a database query"

You say that you made it for general use, would that apply to all table prefixes for Coppermine and Phpbb3?

gassnerj

I have completed all of the aforementioned steps. However I get the following error:
QuoteFatal error: Cannot redeclare cpggetmicrotime() (previously declared in /home/content/g/a/s/gassnerj/html/photos/include/init.inc.php:35) in /home/content/g/a/s/gassnerj/html/photos/include/init.inc.php on line 33

I'm not sure what could be wrong. I have looked this up on google, but I do not get much out of that.

andre_f

Hello,

thanks for your feedback.

Both problems I've already had, but due to the (small) work I've done on the bridge file I'm not sure how I solved them, but I think everything of this had to do with bridge configuration, because no hard coded prefixes are used (the Coppermine prefix is taken from the $CONFIG variable, and the phpBB prefix is taken from $table_prefix of the config.php from the board).
And I checked all other changes I had possible made due fixing the problems you have by using a diff tool - I didn't find anything else I've done.

Nevertheless I've attached a screenshot of my bridge configuration table, to show what should be configured.

Important are the items with the red borders around values.

  • full_forum_url: I think here no description is needed, just enter the full url of your phpBB3 installation here
  • relative_path_of_forum_from_webroot: Dito. In my table this field is blank because the board is installed in the root path. If you've just installed it in a subdirectory like "board", just type in "board" here
  • relative_path_to_config_file: This is a very important entree for redirection and getting phpBB3's db configuration. This path is meant to be relative to your Coppermine installation path to find the config.php of phpBB3. In my case Coppermine is installed in the phpBB3 path as galerie, so I have to go up one level to reach the config file. In most cases the installation paths of both are on the same level, for instance if you installed phpBB3 in path "board" and Coppermine in path "galerie" (both up from the root), you have to write here: "../board/"
  • use_post_based_groups: I don't now what this means, but if it is set to '0' the admin is treated as normal user.
  • cookie_prefix: This is very important, too. Otherwise you're able to login but Coppermine doesn't notice that. The value here has to be the same as 'cookie_name' from phpBB3's configuration table to share the cookie.
  • table_prefix: Normally taken from the config.php of phpBB3, but for safety reasons just enter the prefix of your phpBB3 tables here.
  • guest_group:Id of guest group, normally 1
  • member_group:Id of group of registered members, normally 2
  • admin_group:Id of admin's group, normally 5

Thats all. The value "use_standard_groups" seems to have no effect, but as I said, I'm not sure about this.

I hope this solves the problems.


gele

Hello everybody

I have installed the last bridge.
All seem OK, except:
I can see an error message, when I push "user" button in the admin panel.

   :-[ Excuse my horrible english


andre_f

Hello gele,

you're right, I'm working on this. I expect finishing it in the next hour, then I'll post it again.

andre_f

Sorry, I won't get this today, because I'm reworking the hole user and group management.

But I think I'll finish it tomorrow.

gassnerj

I finally got the bridge to work, save this error
QuoteFatal error: Call to a member function on a non-object in /home/content/g/a/s/gassnerj/html/photos/include/init.inc.php on line 271

I commented it out and it works, except instead of having my username it says USER_NAME and it shows me as being an anonymous user. I'm just learning PHP, any help would be appreciated.

gassnerj

I no longer get this error. I had the last line of php code wrong. instead of $cpg_udb it was $cpg1411_udb. After fixing that, it does not recognize that I am logged in, and I don't get redirected to the login page of the bb. Still working on this to see what I am doing wrong.

gele

I can see other diference with the phpbb2 bridge

full_forum_url

phpbb2 ->  http://www.url.com/forum
phpbb3 ->  http://www.url.com/forum/

I hope this help you. I can't do any more, I don't know php

gassnerj

I noticed that when I had bridging enabled and I went to view a gallery that I had created beforehand, that the user reg date was the same as on the forum. So some bridging was operational. I'm thinking it's something wrong with my cookie settings, but everything looks ok to me.

andre_f

Hello,

I think I have it now. After two days looking into coppermine's code and understanding its user management, I changed the bridge to work with it (not using user levels or something, changed all to use phpbb3 groups).

Now you can use the post-based groups (set "post_based_groups" in the config table of the bridge to "1") and configure each of them.
This means you aren't bound to the standard groups of coppermine and can define restrictions for every group as defined in phpbb3 (RC3).
If you don't need this, leave the value for "post_based_groups" at "0".
Please note that switching between using post-based groups (or not) causes the loss of your group configuration data (max. upload space etc.), so you have to go to the group manager (link "groups") and update the group settings after switching. (This isn't a big piece of work)

If you want to enable a group defined in phpbb3 to have admin rights, add its group id to the initialisation of the admingroups array in constructor:

E.g. if you want to give global moderators (normally having ID 4) admin rights, change the line:

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


to

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


I attached the reworked bridge file, please not that I tested it with the RC3 of phpbb3 only.

@gele: you're right - the board url must end with a slash, otherwise redirection won't function

@gassnerj: I wonder about changing the name of class instance, I ever thought this doesn't depend on Coppermines' table prefix.
I don't think your cookie settings aren't right, I think you haven't placed the correct cookie prefix into your bridge configuration table. This cookie prefix is different to every phpbb3 installation, so you can't use my posted one and have to take the value from phpbb3's config table 'cookie_name'.


gassnerj

that worked great! so far I haven't had any issues. The bridge worked the first time.

08154711

hmmm...

I'm getting the following: when trying to logon at
http://o8154711.de/cpg
my phpbb3 is at http://o8154711/phpbb3

"Not Found
The requested URL /phpbb3ucp.php was not found on this server."

################
phpbb3 domain:



08154711

hmmm...

I'm getting the following: when trying to logon at
http://o8154711.de/cpg/index.html
(my phpbb3 is at http://o8154711/phpbb3)

"Not Found
The requested URL /phpbb3ucp.php was not found on this server."

################
phpbb3 domain: o8154711.de
phpbb3 cookie name;   phpbb3_7hi8t
phpbb3 cookie path: /
################

and if I just go to http://o8154711.de/cpg
I get the following FATAL ERROR

"While executing query "SELECT u.user_id AS id, u.username AS username, u.user_password AS password, u. AS avatar_url, u. AS notify, u. AS auto_subscribe_post, u. AS auto_subscribe_comment, ug.group_id AS group_id FROM `d0059ad3`.phpbb_users AS u, `d0059ad3`.phpbb_user_group AS ug WHERE u.user_id=ug.user_id AND u.user_id='2'" on Resource id #23

mySQL error: You have an error in your SQL syntax.  Check the manual that corresponds to your MySQL server version for the right syntax to use near 'AS avatar_url, u. AS notify, u. AS auto_subscribe_post, u. AS a"

gtk

Everything works fine for me, except that I cannot access any of my admin pages for coppermine?

andre_f

@08154711: the board url is missing the trailing slash. I don't know where this bad sql request comes from, but surely not from the bridge - it doesn't query for something like 'avatar_url'. Are you sure of using the right bridge file and hav everythin configured correctly?

@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.

Grolley

I ran into two things, and one may be the reason for the other.

This entire time, people have been saying that it works, however I have had two issues.

1. It seems set up properly, but it will not log the person into the gallery. They are redirected however they are not logged in. This was during andre_f's FIRST file.

2. The second file you did, the last post, redirects me to ../gallery thus not working properly for the following reason.

My gallery is at http//gallery.domain.com and my forums are at http://forums.domain.com. Could the fact be that I am using subdomains be the issue of the login issue?

Is there a way to code and understanding of subdomains so that I can retain structure of the site?

andre_f

Hello Grolley,

you detected the problem right.

The bridge is programmed for use in one domain, so you'll have only two ways solving it.

The first is not to use the subdomain. I think your both installations are reachable using relative paths, so you could configure that path in the bridge's configuration table.

The second would be overriding the redirection method of the bridge class like this (simply add this method to the phpbb3 bridge):

        function redirect($target)
        {
                header("Location: http://board.domain.com/$target");
                exit;
        }


Then find the following line in the bridges constructor:

    // get path for redirection
    $this->redirect_url = relative_paths(basename($_SERVER['PHP_SELF']), $BRIDGE['relative_path_to_config_file'].'config.php');

And change it to:

    $this->redirect_url = 'http://gallery.domain.com';


Unfortunately I can check this, but it should function for your case.

Grolley

That fixed the redirect issue.

However, I am still not having my users login. I hit the login button, it redirects me to phpbb3 to log in. I log in and then it redirects me to the gallery, but it still says login. It does not say Logout[Username]. Nor does the user have any rights.

What could the problem possibly be?