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]   Go Down

Author Topic: trouble with redirect  (Read 3343 times)

0 Members and 1 Guest are viewing this topic.

dhumann05

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
trouble with redirect
« on: January 09, 2007, 08:37:58 am »

I seem to have created a problem for myself. I installed my forum on a subdomain (board.mttmteens.org) but the gallery is installed on the primary domain. I bridged the two and now when I try to log into coppermine, it takes me to the phpBB2 board to login, and when I enter the cridentials, it either gives me a 404 with a url of "http://board.mttmteens.org/index.php" or it tries to send me back to the gallery while still on the subdomain (ie. board.mttmteens.org/campphotos). I, therefore, cannot get into my coppermine settings at all. Help please?


Coppermine install: http://mttmteens.org/campphotos
Forum install: http://board.mttmteens.org
Coppermine version: cpg1.4.9
Forum version: phpBB2 2.0.21
Test user account: testuser / testuser

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

Nibbler

  • Guest
Re: trouble with redirect
« Reply #1 on: January 09, 2007, 03:18:17 pm »

The redirect can't work like that, since there is no path from the forum to the gallery. PHPBB will not redirect by URL for security reasons. To disable the redirect:

bridge/phpbb2018.inc.php

Code: [Select]
function login_page()
{
global $CONFIG;

$cpg = parse_url($CONFIG['site_url']);
$bb = parse_url($this->boardurl);
$levels = count(explode('/', $bb['path'])) - 1;
$redirect = str_repeat('../', $levels) . trim($cpg['path'], '/') . '/';

$this->redirect("/login.php?redirect=$redirect");
}

function logout_page()
{
global $CONFIG;

$cpg = parse_url($CONFIG['site_url']);
$bb = parse_url($this->boardurl);
$levels = count(explode('/', $bb['path'])) - 1;
$redirect = str_repeat('../', $levels) . trim($cpg['path'], '/') . '/';

$this->redirect("/login.php?logout=true&sid={$this->sid}&redirect=$redirect");
}

change to

Code: [Select]
function login_page()
{
$this->redirect("/login.php");
}

function logout_page()
{
$this->redirect("/login.php?logout=true&sid={$this->sid}");
}

Then add your own links to the gallery from the forum.
Logged

dhumann05

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: trouble with redirect
« Reply #2 on: January 09, 2007, 10:44:50 pm »

add my own links in the forum to the gallery? as in just a hyperlink in a post or what? Is it possible just to disable the bridge altogether?
Logged

Nibbler

  • Guest
Re: trouble with redirect
« Reply #3 on: January 09, 2007, 11:07:28 pm »

Add a link in your forum's navigation. Refer to their boards or documentation for details. Of course you can disable the bridge, this is explained in the manual.
Logged

dhumann05

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: trouble with redirect
« Reply #4 on: February 06, 2007, 03:13:39 pm »

is there any way, in my current situation, to just disable the bridge? (I havent yet figured out how to add a link to my gallery in my forum navigation. I also have been busy so I havent slaved too much over it yet). Any help would be appreciated.
Logged

Nibbler

  • Guest
Re: trouble with redirect
« Reply #5 on: February 06, 2007, 03:16:22 pm »

Yes, read the manual as suggested.
Logged

dhumann05

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: trouble with redirect
« Reply #6 on: February 06, 2007, 03:38:08 pm »

ok, so I have a link in the navigation for the forum. I click "login" on the gallery, it takes me to the forum, I login, click the gallery link, and it takes me to the gallery while still not logged in??
Logged

Nibbler

  • Guest
Re: trouble with redirect
« Reply #7 on: February 06, 2007, 03:53:34 pm »

Your forum's cookie domain should be set to .mttmteens.org
Logged
Pages: [1]   Go Up
 

Page created in 0.018 seconds with 15 queries.