[Solved]: Login/Redirection Problems... [Solved]: Login/Redirection Problems...
 

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

[Solved]: Login/Redirection Problems...

Started by PCGUY112887, August 21, 2004, 05:01:27 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

PCGUY112887

Ok I tought I did everything corectelly... but when I go to my forums in /forums2 and try to login, I enter my pw and everything and hit login.. but it just sends me back to the forums main page.. and i'm not logged in.

So I go over to my gallery in /gallery and hit login... it takes me here
http://www.spudfiles.com/forum2/login.php?redirect=cpg_redir.php
And I get a 404
I hit register and it takes me to...
http://www.spudfiles.com/forum2/profile.php?mode=register
And I 404 again.

I know I just set something up wrong but I am too blind to see it.. any help please? :)

Joachim Müller

post link to gallery, test user account (non-admin) of your bbs, the bbs version you use, the content of your reidrection file and your bridge file (replace password with asterisks).

GauGau

P.S. In the future, use a more descriptive subject line to attract supporters or users who might know the answer...

PCGUY112887

Wow I could have swore I already posted all of the info.. guess i'm looseing it :-P

Gallery - 1.3.2 - http://www.spudfiles.com/gallery/
phpBB Forums - 2.0.10 - http://www.spudfiles.com/forums2/

And I made a new login... username "test" password "test".. but you can't login into the forums or gallery it's part of my problem  :-\\

Here is my redirection file...

<?php
if (!$_SERVER['HTTP_HOST']) {
  
$cpg_host=$HTTP_SERVER_VARS['HTTP_HOST'];
} else {
  
$cpg_host=$_SERVER['HTTP_HOST'];
}
$cpg_path='/gallery';
header("Location: http://".$cpg_host.$cpg_path);
exit;
?>


And bridge file.. it's a bit long so I cut it so it would let me post it :)

<?php
// ------------------------------------------------------------------------- //
// Coppermine Photo Gallery 1.3.2                                            //
// ------------------------------------------------------------------------- //
// Copyright (C) 2002-2004 Gregory DEMAR                                     //
// http://www.chezgreg.net/coppermine/                                       //
// ------------------------------------------------------------------------- //
// Updated by the Coppermine Dev Team                                        //
// (http://coppermine.sf.net/team/)                                          //
// see /docs/credits.html for details                                        //
// ------------------------------------------------------------------------- //
// This program is free software; you can redistribute it and/or modify      //
// it under the terms of the GNU General Public License as published by      //
// the Free Software Foundation; either version 2 of the License, or         //
// (at your option) any later version.                                       //
// ------------------------------------------------------------------------- //
// CVS version: $Id: phpbb.inc.php,v 1.9 2004/07/24 15:04:10 gaugau Exp $
// ------------------------------------------------------------------------- //
// phpBB2 Integration for Coppermine                                         //
// ------------------------------------------------------------------------- //
// Modify the values below according to your Board installation              //
// ------------------------------------------------------------------------- //

// database configuration
define('PHPBB_DB_NAME''pcguy_gallery'); // The name of the database used by the board
define('PHPBB_BD_HOST''localhost'); // The name of the database server
define('PHPBB_DB_USERNAME''pcguy_pcguy'); // The username to use to connect to the database
define('PHPBB_DB_PASSWORD''***********'); // The password to use to connect to the database

// The web path to your phpBB directory
// If your URL to your board is for example 'http://yoursite_name.com/phpBB2/',
// you'll have to set the below var to '/phpBB2/'.
define('PHPBB_WEB_PATH''/forum2/');
// Logout Flag
// the value of this boolean constant depends on your phpBB version:
// If your version of phpBB is 2.0.4 or lower - change the value to FALSE;
// if your version of phpBB is 2.0.5 or newer - leave it as TRUE
define('PHPBB_LOGOUT_GET'TRUE);
// ------------------------------------------------------------------------- //
// You can keep the default values below if your instalation is standard
// ------------------------------------------------------------------------- //
// The prefix for the phpBB cookies
define('PHPBB_COOKIE_PREFIX''phpbb2mysql'); // The prefix used for board cookies

// Prefix and names for the database tables
define('PHPBB_TABLE_PREFIX''phpbb_'); // The prefix used for the DB tables
define('PHPBB_USER_TABLE''users'); // The members table
define('PHPBB_SESSION_TABLE''sessions'); // The session table
define('PHPBB_GROUP_TABLE''groups'); // The groups table
define('PHPBB_UGROUP_TABLE''user_group'); // The group/user table

// ------------------------------------------------------------------------- //
// Nothing to edit below this line
// ------------------------------------------------------------------------- //

PCGUY112887

Ok I found one of my problems... in the bridge file I had /forum2 when it's really /forums2

So all of the links work now.. but still when I try to login it just does nothing.  When I hit the login button on the gallery it takes me to phpBB login, I use my username and pw and it just takes me back to the gallery not logged in.

Nibbler

Your board isn't even setting any cookies - thats the problem, you'll have to take a look at its setup.

PCGUY112887

The board cookies are set at whatever they were default.. but it did say cookie domain and it was blank so I added "http://www.spudfiles.com".

And I can't login to change anything... happen to know what file the cookie settings are stored in for the board and what I should set them to?

Nibbler

'http://www.spudfiles.com' is not a valid cookie domain - that's probably why they are not working. I suppose the setting to change would be in the database somewhere, but I don't run a phpbb forum so I don't give you directions.

PCGUY112887

Ah ok I got that out of there and now it's working!!!
YAY!

Ok now time for 1 more question.. how could I make a simple page to use to login, then after you use that login page it would just redirect you wherever?  What I wanted to do is like have a simple login/logout/remember me box on my main website... when you logged in you would be logged into the forums and to the gallery.

I guess i'm asking how to make a very simple portal page that will be used in an include :)

Joachim Müller

we have a one question per thread policy on this board, and your question is not related to coppermine, as login isn't managed anymore by coppermine, but your bbs. That's why I locked this thread and tagged it as [Solved].
You're supposed to ask such a question on the support board of your bbs. You could however take another look at the integration instructions and check if you can use the redirection page that is suggested to be set up.

Gaugau