Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: 1 2 [3] 4 5 6 7 8   Go Down

Author Topic: [Closed]: phpBB 3 olympus and coppermine 1.4.10 bridge integration  (Read 130390 times)

0 Members and 1 Guest are viewing this topic.

Grolley

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
    • http://photos.grolley.com
Re: phpBB 3 olympus and coppermine 1.4.10 bridge integration
« Reply #40 on: July 24, 2007, 05:54:26 pm »

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. :/
Logged

Grolley

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
    • http://photos.grolley.com
Re: phpBB 3 olympus and coppermine 1.4.10 bridge integration
« Reply #41 on: July 24, 2007, 06:02:05 pm »

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?
Logged

gassnerj

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 5
    • MyForum
Re: phpBB 3 olympus and coppermine 1.4.10 bridge integration
« Reply #42 on: July 25, 2007, 03:38:29 am »

I have completed all of the aforementioned steps. However I get the following error:
Quote
Fatal 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.
Logged

andre_f

  • Coppermine newbie
  • Offline Offline
  • Posts: 14
Re: phpBB 3 olympus and coppermine 1.4.10 bridge integration
« Reply #43 on: July 25, 2007, 08:58:57 am »

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.

Logged

gele

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: phpBB 3 olympus and coppermine 1.4.10 bridge integration
« Reply #44 on: July 25, 2007, 12:52:49 pm »

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

Logged

andre_f

  • Coppermine newbie
  • Offline Offline
  • Posts: 14
Re: phpBB 3 olympus and coppermine 1.4.10 bridge integration
« Reply #45 on: July 25, 2007, 01:00:15 pm »

Hello gele,

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

andre_f

  • Coppermine newbie
  • Offline Offline
  • Posts: 14
Re: phpBB 3 olympus and coppermine 1.4.10 bridge integration
« Reply #46 on: July 25, 2007, 02:22:01 pm »

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

gassnerj

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 5
    • MyForum
Re: phpBB 3 olympus and coppermine 1.4.10 bridge integration
« Reply #47 on: July 25, 2007, 06:50:56 pm »

I finally got the bridge to work, save this error
Quote
Fatal 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.
Logged

gassnerj

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 5
    • MyForum
Re: phpBB 3 olympus and coppermine 1.4.10 bridge integration
« Reply #48 on: July 25, 2007, 07:44:37 pm »

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

gele

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: phpBB 3 olympus and coppermine 1.4.10 bridge integration
« Reply #49 on: July 25, 2007, 09:20:13 pm »

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
Logged

gassnerj

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 5
    • MyForum
Re: phpBB 3 olympus and coppermine 1.4.10 bridge integration
« Reply #50 on: July 25, 2007, 11:03:18 pm »

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

andre_f

  • Coppermine newbie
  • Offline Offline
  • Posts: 14
Re: phpBB 3 olympus and coppermine 1.4.10 bridge integration
« Reply #51 on: July 27, 2007, 09:01:36 am »

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:
Code: [Select]
$this->admingroups = array($BRIDGE['admin_group']);

to
Code: [Select]
$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'.

Logged

gassnerj

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 5
    • MyForum
Re: phpBB 3 olympus and coppermine 1.4.10 bridge integration
« Reply #52 on: July 27, 2007, 04:18:21 pm »

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

08154711

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: phpBB 3 olympus and coppermine 1.4.10 bridge integration
« Reply #53 on: July 27, 2007, 05:30:47 pm »

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:


Logged

08154711

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: phpBB 3 olympus and coppermine 1.4.10 bridge integration
« Reply #54 on: July 27, 2007, 05:35:24 pm »

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"
Logged

gtk

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 31
Re: phpBB 3 olympus and coppermine 1.4.10 bridge integration
« Reply #55 on: July 27, 2007, 07:06:38 pm »

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

andre_f

  • Coppermine newbie
  • Offline Offline
  • Posts: 14
Re: phpBB 3 olympus and coppermine 1.4.10 bridge integration
« Reply #56 on: July 27, 2007, 08:28:04 pm »

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

Grolley

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
    • http://photos.grolley.com
Re: phpBB 3 olympus and coppermine 1.4.10 bridge integration
« Reply #57 on: July 27, 2007, 10:14:33 pm »

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?
Logged

andre_f

  • Coppermine newbie
  • Offline Offline
  • Posts: 14
Re: phpBB 3 olympus and coppermine 1.4.10 bridge integration
« Reply #58 on: July 28, 2007, 07:43:24 pm »

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):
Code: [Select]
        function redirect($target)
        {
                header("Location: http://board.domain.com/$target");
                exit;
        }

Then find the following line in the bridges constructor:
Code: [Select]
    // 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:
Code: [Select]
    $this->redirect_url = 'http://gallery.domain.com';

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

Grolley

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
    • http://photos.grolley.com
Re: phpBB 3 olympus and coppermine 1.4.10 bridge integration
« Reply #59 on: July 28, 2007, 11:57:57 pm »

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?
Logged
Pages: 1 2 [3] 4 5 6 7 8   Go Up
 

Page created in 0.029 seconds with 22 queries.