Login/Logout Error - Page Cannot Be Found - PHPBB & CPG Login/Logout Error - Page Cannot Be Found - PHPBB & CPG
 

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

Login/Logout Error - Page Cannot Be Found - PHPBB & CPG

Started by Chopper, March 08, 2005, 09:45:11 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Chopper

I have CPG1.3 and PHPBB2.0.13 on my website. I installed both as stand-alone and integrated them and got them working perfectly with my own themes that I designed myself.

However, after I restored my database, the integration stopped working. I am able to login and log out of PHPBB just fine. The issue is from the Coppermine page. When I click the login link on my Coppermine page, I get redirected to the PHPBB login page, which is great. But after I enter my information and I click login, I get forwarded to this address...

http://www.animationcorner.com/forums/login.php?sid=ab53d61aa074de7f4895983e9be13614

...which is a "Page Cannot Be Found".

Also, when I try to log out from the Coppermine page, I get a "Page Cannot Be Found" with this address...

http://www.animationcorner.com/studio/logout.php?referer=%2Fstudio%2F


Here is my information for testing:


Website: http://www.animationcorner.com
Username: test
Password: test



I suspect that since the error occurred only after restoring my database (didn't touch a single file or make a single config change), that something in the restored database is screwing up the page. Just not sure what. Any help is appreciated. Thanks.

Chopper

#1
Crap...I went and changed the cookie name in Coppermine to see if that would fix it and now I can't login to Coppermine.

It also seems to take me to my homepage when I click the Login link from Coppermine. Something's weird. If anyone needs me to post any code, let me know.

Joachim Müller

after loging in to your board, you're being sent to http://animationcorner.com/cpg_redir.php (which gives you a 404 error), while the redirection file cpg_redir.php is suppossed to be located in your forum folder (http://www.animationcorner.com/forums/). This is being caused by a wrong bridge file setup. Post your bridge file (at least the first lines that you edited). Remember to replace your password with asterisks.

Joachim

P.S. What happened to the phpbb disclaimer (footer) on your forum page? We believe in giving credit where credit is due; although we're not associated with the phpbb group, we respect their work, and so should you. Please put the usual phpBB footer back to where it belongs.

Chopper

Here's the code from my bridge file:

// database configuration
define('PHPBB_DB_NAME', 'animati_main'); // The name of the database used by the board
define('PHPBB_BD_HOST', 'localhost'); // The name of the database server
define('PHPBB_DB_USERNAME', 'animati_greycow'); // 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', '/forums/');
// 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




Here's the code for my cpg-redirect:

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



Other possible pertinent information...

PHPBB2 Settings:
Cookie Domain:
Cookie Name: phpbb2mysql
Cookie Path: /

Coppermine Settings:
Cookie Name: cpg132
Cookie path: /

Thanks.

Chopper

Added the PHPBB link back.

Reason I took the PHPBB link off was that I read in more than a few PHPBB forums that PHPBB.org requested that we leave it, but that it was up to us whether to remove it or not. I did it mostly for aesthetics, but...I guess you're right. Kind of messed up with all the work involved, not to mention them. I'll leave it for good.

Nibbler

Do you have your script path set properly in phpbb's config ? It may be called 'The path where phpBB2 is located relative to the domain name'

Chopper

Quote from: Nibbler on March 08, 2005, 06:59:19 PM
Do you have your script path set properly in phpbb's config ? It may be called 'The path where phpBB2 is located relative to the domain name'

Well, still got some problems, but this was helpful a little. You were right that I think I had a setting wrong for the path.

Before:
Script Path: (was blank)

Now:
Script Path: /forums/

Changin this made it so I don't get any Page Cannot Be Found 404 errors any more, so that's good. I can logout from the Coppermine page fine. However, the site is still kind of screwy with Login. For example, when I try to login from Coppermine, it redirects me back to Coppermine, but I'm not logged in.

Also, when I try to login link from my main homepage, it doesn't login me in either and it redirects me back to homepage for some reason.

canelli

I tried login in your coppermine gallery and all seen work fine


Chopper

Quote from: canelli on March 08, 2005, 07:25:53 PM
I tried login in your coppermine gallery and all seen work fine

Yeah, that's wierd. I'm testing it too at the moment and it seems fine, but there is still one small glitch.

To replicate the problem, try this...

1. Go to the main homepage of the site.
2. Then click the "Studio" link at the top of the page to take you to my coppermine page.
3. Now click the login link on that page and after entering info, it doesn't log the user in.

Seems to only be a problem when done in that order though.

Tranz

I followed your instructions and was able to stay logged in.

Keep an eye on the URL. When it comes to cookies,
http://www.animationcorner.com/

is different from

http://animationcorner.com/

Chopper

Ok, that's wierd. I still get the problem. I tried clearing my cookies just to be sure, but it still won't log me in from the Coppermine page.

Here are my PHPBB2 and Cookie settings. Is there anything wrong here?


PHPBB2 Config Settings:
Domain Name: animationcorner.com
Script Path: /forums/

PHPBB2 Cookie Settings:
Cookie Domain:
Cookie Name: phpbb2mysql
Cookie Path: /


Coppermine Cookie Settings:
Cookie Name: cpg132
Cookie path: /

Quote from: TranzNDance on March 08, 2005, 07:39:08 PM
I followed your instructions and was able to stay logged in.

Keep an eye on the URL. When it comes to cookies,
http://www.animationcorner.com/

is different from

http://animationcorner.com/

Do you mean, when I log into the page, am I logging in by http://www.animationcorner.com or just http://animationcorner.com? Or are you referring to something I should change in my config settings by either leaving or removing the www prefix?

Tranz

Which URL do you use to get to your site? I used the one you provided in your first post.

Chopper

Quote from: TranzNDance on March 08, 2005, 08:14:58 PM
Which URL do you use to get to your site? I used the one you provided in your first post.

I'm using: http://www.animationcorner.com and getting the problem with login.

I'll try to describe my problem in more detail:

When I login from the link on the navigation bar from the Coppermine page, I enter my info, click the Login button, then I get redirected back to Coppermine again, but I can see that I'm not logged in. When I look at the navigation bar on the coppermine page, the login link should change to Logout [Username], but it doesn't. It still says Login.

Then if I click the Forums link to go to PHPBB, it shows I'm logged in.

Sometimes it works, sometimes it doesn't. I'm still wondering that if it works for others, then it must be something with my browser settings.


kegobeer

There's a difference between www and no www before the domain.  Look in your cookies and see if you have a cookie set for www.animationcorner.com and one for animationcorner.com.  Delete them both.

I also have no problem logging into your site from Coppermine via the login link.  I get redirected back to Coppermine and show logged in.
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

Chopper

Ok, after I cleared cookies, it was still doing it, but I rebooted my computer and now it is working perfect.

Thanks everyone for the help with troubleshooting the problem!

Nibbler, thanks for the help in pointing out the Path Script in the PHPBB configuration. That seemed to be the main reason the error went away and the integration fixed itself.

This problem is solved for me.

Chopper

Crap, i spoke to soon. I had a friend register and he's having the same issue. Unable to stay logged into Coppermine.

This sucks, it reminds me of when your car makes a funny noise, but you can't replicate the same noise for the mechanic. My site is definitely not working right and it's not only on my computer.

Users are unable to stay logged into the Coppermine page. When logged into Coppermine page, the navbar should say Profile, Logout [Username], etc, but it just says Login.

Oh well...this thread's been titled "Solved", so I doubt anyone will respond. Thanks anyway. Maybe I can figure it out somehow.

Tranz

Please list as much information about your setup as possible.

Browser, OS, security software, theme you're using, and anything else that may be different on your computer that could cause login inssues.

Chopper

Thanks for responding!

Computer and Browser Settings
Browser: Internet Explorer 6.0
OS: Windows XP Pro
Security Software: Norton Anti-Virus
Themes: Created by myself off of the Coppermine (Classic Theme) and the PHPBB2 (subSilver Theme).
Cookies and Cache: (Cleared them out before testing the problem)

The fact that the problem is showing up on other people's computer leads me to believe there is something screwed up in my code or my configuration of the scripts, and not my personal computer settings. If there is any code from any file you wish to look at, let me know and I can post it.

Other misc Information:
On the main homepage of my website, I'm using PHPBB Fetch All mod to get some links from PHPBB.
I also use CPG Fetch to get some thumbnails from Coppermine to the main homepage.

PHPBB2 Related Information:

PHP Configuration Screen:
Domain Name: animationcorner.com
Server Port: 80
Script Path: /forums/

PHPBB2 Cookie Settings:
Cookie Domain:
Cookie Name: phpbb2mysql
Cookie Path: /
Cookie Secure: (disabled checked)
Session Length: 3600

phpbb.inc.php (in Coppermine Bridge directory)

// database configuration
define('PHPBB_DB_NAME', 'animati_main'); // The name of the database used by the board
define('PHPBB_BD_HOST', 'localhost'); // The name of the database server
define('PHPBB_DB_USERNAME', 'animati_greycow'); // 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', '/forums/');


I uncommented out PHPBB line in the init.inc.php file.
init.inc.php (in Coppermine Include directory)

define('UDB_INTEGRATION', 'phpbb');


cpg_redir.php (in main PHPBB2 directory)

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



I've also edited template.html and theme.php under Coppermine and I've edited overall_header.tpl and it's cooresponding CSS file under PHPBB2.
Let me know if there is anything else you can think of that I missed. Not sure what else will help.


Tranz

Do you have your IE security set to high? Have you tried testing in another browser like Firefox?

See if it helps to use the classic theme:
http://www.animationcorner.com/studio/?theme=classic

Chopper

My Internet settings are set to Medium.

I just tested it with Classic theme in Coppermine and login problem is still there.

I also tried testing it with subSilver theme in PHPBB2 and problem still exists.

It's kind of tricky to replicate the problem. I'm not sure how to make it happen. If you click login and logout just once to test it, it's going to look and work fine to someone who just shows up to the site for the first time. However, if you go to different pages within the site, logging in and logging out, while coming back to the Coppermine page and tyring to login to Coppermine page, eventually the problem comes up where it doesn't log the user in. Pretty wierd.  :-\\