please help: bridge cpg and phpbb please help: bridge cpg and phpbb
 

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]

Main Menu

please help: bridge cpg and phpbb

Started by silyashevich, January 24, 2006, 08:25:57 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

silyashevich

I have the following issue when trying to bridge coppermine and phpbb:
after login on board i redirect to galery by URL http://photo.shuya.ru//?sid=cb4f65954c4d9e96bdfb4f0e82b39a4 and failed login to cpg

Coppermine install: http://photo.shuya.ru
Forum install: http://photo.shuya.ru/board/
Coppermine version: cpg 1.4.3
Forum version: phpbb 2.0.19
Test user account: testuser / testuser

BridgeManager settings:
Forum URL:  http://photo.shuya.ru/board
Relative path to your BBS's config file: board/
Use post-based groups?:  0

udb_base.inc.php - v 1.3 from http://cvs.sourceforge.net/viewcvs.py/coppermine/stable/bridge/
phpbb2018.inc.php - v 1.11 from http://cvs.sourceforge.net/viewcvs.py/coppermine/stable/bridge/
with this settings

            $this->boardurl = 'http://photo.shuya.ru/board';
            require_once('/board/config.php');


settings phpbb:
cookies domain: photo.shuya.ru
cookies name: phpbb2mysql
cookies patch: /

settings cpg:
cookies name: cpg143
cookies patch: /

Nibbler

Looks OK to me, please enable the bridge.

Blueiris

I was looking at the relative path to the BBS config file. Shouldn't that be

Quote/board/
You can lead a horse to water, but you can't make him drink - he's got to discover that it's wet for himself.

silyashevich

#3
Quote from: Nibbler on January 24, 2006, 08:40:27 PM
Looks OK to me, please enable the bridge.
bridge_enable set to 1

cpg_redir.php listing:

<?php
$cpg_host
=$_SERVER['HTTP_HOST'];
$cpg_path='';
header("Location: http://".$cpg_host.$cpg_path);
exit;
?>



http://photo.shuya.ru/1.php listing:

<?
echo $_SERVER['HTTP_HOST'];
?>


:(

silyashevich

Quote from: Blueiris on January 24, 2006, 08:57:30 PM
I was looking at the relative path to the BBS config file. Shouldn't that be /bord/

Fatal error: phpbb2018_udb(): Failed opening required '/board/config.php' (include_path='.:/usr/local/php/lib/php') in /var/www/vhosts/shuya.ru/photo/bridge/phpbb2018.inc.php on line 39

with /board/

2Nibbler: i set bridge_enable to 1 tommorov. ok?

Joachim Müller

"tomorrow" may have a different meaning for you as for others. There are time-zone differences, Coppermine users and supporters come from around the globe.

Blueiris

Quote from: silyashevich on January 24, 2006, 09:47:00 PM


cpg_redir.php listing:

<?php
$cpg_host
=$_SERVER['HTTP_HOST'];
$cpg_path='';
header("Location: http://".$cpg_host.$cpg_path);
exit;
?>



http://photo.shuya.ru/1.php listing:

<?
echo $_SERVER['HTTP_HOST'];
?>


Now I'm confused. You say you are using phpBB2.0.19 and cpg1.4.3, but I believe that the cpg_redir.php file was only needed with cpg1.3.x. Under cpg1.4.3, the redirect is handled differently. What is 1.php?

Did you use the Bridge Manager under Admin Tools to create the bridge, or did you do it the way it used to be done under cpg1.3.x?

As a first step to solve your problem, I would suggest reading the documentation on bridging at:

http://coppermine-gallery.net/demo/cpg14x/docs/index.htm#integrating

Next, I would recommend eliminating cgp_redir.php. Then go to the Bridge Manager under Admin Tools and run the Bridge Wizard, making sure that all of the settings are correct.

As far as the path to phpBB config is concerned, if your coppermine install is at http://photo.shuya.ru, and your board is in a subdirectory of that subdomain at http://photo.shuya.ru/board, the the path to phpBB config php should be /board/. However, if that isn't correct, you can try board/. It is OK to run the Bridge Wizard more than once to correct settings.

You can lead a horse to water, but you can't make him drink - he's got to discover that it's wet for himself.

Nibbler

board/ is the correct setting. /board/ is an absolute path and would refer to the root of the server. What have you specified the cookie prefix as in the bridge manager ?

silyashevich

#8
Quote from: Nibbler on January 24, 2006, 11:45:23 PM
board/ is the correct setting. /board/ is an absolute path and would refer to the root of the server. What have you specified the cookie prefix as in the bridge manager ?
phpbb2mysql

code table bridge:

VALUES ('short_name','phpbb2018');
VALUES ('license_number','');
VALUES ('db_database_name','');
VALUES ('db_hostname','');
VALUES ('db_username','');
VALUES ('db_password','');
VALUES ('full_forum_url','http://photo.shuya.ru/board');
VALUES ('relative_path_of_forum_from_webroot','');
VALUES ('relative_path_to_config_file','board/');
VALUES ('logout_flag','');
VALUES ('use_post_based_groups','0');
VALUES ('cookie_prefix','phpbb2mysql');
VALUES ('table_prefix','');
VALUES ('user_table','');
VALUES ('session_table','');
VALUES ('group_table','');
VALUES ('group_relation_table','');
VALUES ('group_mapping_table','');
VALUES ('use_standard_groups','1');
VALUES ('validating_group','');
VALUES ('guest_group','');
VALUES ('member_group','');
VALUES ('admin_group','');
VALUES ('banned_group','');
VALUES ('global_moderators_group','');
VALUES ('recovery_logon_failures','0');
VALUES ('recovery_logon_timestamp','');


cookie prefix -> phpbb2mysql

Blueiris

I'll defer to Nibbler on the technical side of this, rather than swallow the foot I had already put in my mouth!  ::) He is correct, of course, that the relative path should be "board/".

However, I tried a test install of cpg1.4.3 with phpBB2.0.19 in a subdirectory, the way you have it installed, and I was not able to duplicate your problem. Bridging went smoothly and worked correctly on 4 separate tries. For what it may be worth, I'll outline the steps I took, and the results in the db.

One note - you listed udb_base.inc.php - v 1.3 in your first post. Did you mean revision 1.13? The most current revision on CVS is 1.14 (posted just a few hours ago).

Files: phpbb2018.inc.php revision 1.11 and udb_base.inc.php revision 1.13

Admin Tools >> Bridge Manager >> Start bridging wizard

On the first screen of the bridging wizard, "phpBB version 2.0.18 or better" is checked.

On the next screen, for forum URL: http://localhost/gallery/board. For the relative path to phpBB config: board/. For cookie prefix, the default: phpbb2mysql. "Hide unused form fields," checked.

On the next screen, use post based groups: no.

When the bridging wizard finished, I then hit logout, and got the "you are not logged in" error, which is nothing to worry about. I then clicked on login in, and was redirected to the phpBB login page, with the URL: http://localhost/gallery/board/login.php?redirect=../../gallery/. After logging in, I was logged in on both the board and gallery.

In the database, after bridging, in the cpg143_config table, enable_bridge was 1.

The cpg143_bridge was exactly like yours except for the different URL:

Quote
short_name     phpbb2018
license_number    
db_database_name    
db_hostname    
db_username    
db_password    
full_forum_url    http://localhost/gallery/board
relative_path_of_forum_from_webroot    
relative_path_to_config_file    board/
logout_flag    
use_post_based_groups    0
cookie_prefix    phpbb2mysql
table_prefix    
user_table    
session_table    
group_table    
group_relation_table    
group_mapping_table    
use_standard_groups    1
validating_group    
guest_group    
member_group    
admin_group    
banned_group    
global_moderators_group    
recovery_logon_failures    0
recovery_logon_timestamp

The differences between my test install and yours, going by what you have posted so far, are that: 1) your installs are on a subdomain, 2) I'm not sure we are using the same version of udb_base.inc.php, and 3) you have cpg_redir.php in yours.

The info above from a working bridge should give you a basis for comparison with your install. If you still can't get it working, then I'll be glad to dig further. I can't set up an install on a subdomain right now, because my server isn't configured for subs, but I can change that, and try a test install in a subdomain later tonight (my time: GMT-5) if that will help.



You can lead a horse to water, but you can't make him drink - he's got to discover that it's wet for himself.