First connection "reboot" problem with 2.0.22

This is an archive of the phpBB 2.0.x support forum. Support for phpBB2 has now ended.
Forum rules
Following phpBB2's EoL, this forum is now archived for reference purposes only.
Please see the following announcement for more information: viewtopic.php?f=14&t=1385785
User avatar
Pouzy
Registered User
Posts: 35
Joined: Wed Dec 29, 2004 9:56 am
Location: France
Contact:

First connection "reboot" problem with 2.0.22

Post by Pouzy »

Hello ! At first, sorry if my english is poor, but I'm french.

I've got a problem right due to the newest version, 2.0.22, because it wasn't there in the 2.0.21.

I use the phpbb sessions directly on my website http://www.aidoforum.com with this code :

Code: Select all

if ($user)
{
   $requete = "SELECT * FROM phpbb_users WHERE username='$user'";
   $result = mysql_query($requete, $idConnexion);
   $userdata = mysql_fetch_array($result);
   $row = $userdata;
}


if( !$no_module_connect ) {
define ('IN_PHPBB', true);
// Le path vers ton forum
$phpbb_root_path = $dossier.'forum/';
if (!file_exists($phpbb_root_path . 'extension.inc'))
{
    die ('<tt><b>hum:</b>
          $phpbb_root_path is wrong and does not point to your forum.</tt>');
}
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);

//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX, $session_length);
init_userprefs($userdata);

if ($userdata['username'] == "Anonymous")
{
$user = false;
}
else
{
$user = $userdata['username'];
$userid = $userdata['user_id'];
}

//
// End session management
//
if (isset($HTTP_GET_VARS['start']) or isset($HTTP_POST_VARS['start'])) {
    $CFG['posts_span_pages_offset'] = isset($HTTP_GET_VARS['start']) ? $HTTP_GET_VARS['start'] : $HTTP_POST_VARS['start'];
}
And the problem is that, when someone demands to be connected automatically, when he closes the window and open it a new time, he will be connected for the first viewed page, but if he refreshs or change page, he would be disconnected !. And that happens just with Firefox.

I can't understand why ! I saw that the 2.0.22 changed things with the sessions, but what happened... I'm not enough strong to understand.

I precise that if he reconnect, there's no more problem before a new session starts.

Thank's for you help !

Pouzy
Last edited by Pouzy on Fri Jan 26, 2007 4:11 pm, edited 1 time in total.
User avatar
Pouzy
Registered User
Posts: 35
Joined: Wed Dec 29, 2004 9:56 am
Location: France
Contact:

Post by Pouzy »

Up ! :)
User avatar
Pouzy
Registered User
Posts: 35
Joined: Wed Dec 29, 2004 9:56 am
Location: France
Contact:

Post by Pouzy »

Up, my members are furious and i don't find anything :(
espicom
Registered User
Posts: 17905
Joined: Wed Dec 22, 2004 1:14 am
Location: Woodstock, IL

Post by espicom »

Jeff
Fixing 1016/1030/1034 Errors | (obsolete link) | MySQL 4.1/5.x Client Error | phpBBv2 Logo in ACP
Support requests via PM are ignored!
"To be fully alive is to feel that everything is possible." - Eric Hoffer
User avatar
Pouzy
Registered User
Posts: 35
Joined: Wed Dec 29, 2004 9:56 am
Location: France
Contact:

Post by Pouzy »

I tried the Auto Cookie mod, here it goes :

My Suggested Cookie Settings:
  • Nom de domaine: www.aidoforum.com
  • Port du serveur: 80
  • Chemin du script: /forum/
  • Cookie sécurisé: Désactivé
  • Domaine du cookie: .aidoforum.com
  • Chemin du cookie: /forum
  • Nom du cookie: aidoforum_forum
  • Durée de la session [ secondes ]: 3600
  • Permettre les connexions automatiques: Yes
  • Expiration de la clef de connexion automatique: 0
My Current Cookie Settings:
  • Nom de domaine: www.aidoforum.com
  • Port du serveur: 80
  • Chemin du script: /forum/
  • Cookie sécurisé: Désactivé
  • Domaine du cookie:
  • Chemin du cookie: /
  • Nom du cookie: aidoforum
  • Durée de la session [ secondes ]: 3600
  • Permettre les connexions automatiques: Oui
  • Expiration de la clef de connexion automatique: 0
I'm gonna try with the new directory and domain, but... I don't understand because it was great before ! And the symptoms are not the same as mine...
The problem is that it just comes with Firefox ! With IE, all's all right ! That's crazy.. Noone have got this problem ? Can it come from the server ?

Thanks

EDIT : I've tried with the suggested domain, it does'nt work at all, I can't log in. I think the cookie is good configured, but the problem is with the sessions, no ?
User avatar
Pouzy
Registered User
Posts: 35
Joined: Wed Dec 29, 2004 9:56 am
Location: France
Contact:

Post by Pouzy »

I think that it could be a problem with the "update to latest" file... Because it drops session table, no ?
User avatar
Lumpy Burgertushie
Registered User
Posts: 67911
Joined: Mon May 02, 2005 3:11 am
Contact:

Post by Lumpy Burgertushie »

no, it doesn't drop the sessions table, as a matter of fact, the only thing .22 does to the database is update the version number.

you problem is your cookie settings are wrong.

run the cookie MOD again, change the cookie name to something different, then accept the suggested settings.

log out of your board and then back in and see what happens.

robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.3 Styles by PlanetStyles.net

If nobody is in the forest, does a tree really fall?
User avatar
Pouzy
Registered User
Posts: 35
Joined: Wed Dec 29, 2004 9:56 am
Location: France
Contact:

Post by Pouzy »

I've already done it, and it can't connect anymore with the settings here... :/ But I didn't change anything with the cookie so why could there be a problem ? And juste with Firefox ? And when the disconnection take a long time ? ( if you just close the explorer, and re-open it, that would be ok... )

Precision, i made URL Rewriting wich drops the sessions, but it's really old and everything was ok before... You can see the URL rewirting code here : http://www.aidoforum.com/forum/sujet-1697.html

Edit : Ok, I've tried with the new settings another time : it works on the forum, but the site doesn't see the cookie anymore ! You're logged on the forumn but not on the site :(

EDit2 : in the u^date_to_latest, I see that :

Code: Select all

				$sql[] = "ALTER TABLE " . USERS_TABLE . " DROP
					COLUMN user_autologin_key";
Isn't that a dropping of a session table ?
User avatar
Lumpy Burgertushie
Registered User
Posts: 67911
Joined: Mon May 02, 2005 3:11 am
Contact:

Post by Lumpy Burgertushie »

that is not in the section that applies to .22 and besides that, it has nothing to do with the sessions table. why would you think it did?

the .22 update makes some changes to the sessions but not in the database.

that is why you have to reset your cookie settings correctly.

if you are running some type of cms or integrating phpbb with the rest of your site, you may have to leave the cookie path to / instead of /forum

but you do need to put in the cookie domain as :
.aidoforum.com

and you need to change the cookie name to something different, then log out and then go back and test.

follow these instructions, exactly. then if if doesn't work, we can try other things.
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.3 Styles by PlanetStyles.net

If nobody is in the forest, does a tree really fall?
User avatar
Pouzy
Registered User
Posts: 35
Joined: Wed Dec 29, 2004 9:56 am
Location: France
Contact:

Post by Pouzy »

Ok I've changed the cookie domain and name, it seems to be exactly the same. What I don't understand is : why is the first page connected ? And then, the refresh is disconnected...

That's totally crazy :(

EDIT : With the / path, and .aidoforum.com domain, you can't connect yourself anymore :/

EDIT2 : When I réupload an old version of the forum, the problem is the same.. I don't understand what happens, because I did'nt tuch my database (nothing but update_to_latest )
User avatar
Pouzy
Registered User
Posts: 35
Joined: Wed Dec 29, 2004 9:56 am
Location: France
Contact:

Post by Pouzy »

Okay, I'm now sure that it comes from the database :
I've uploaded an original version of phpbb 2.0.22, and, when it's uploaded there's no problem, but if I just change the prefix to use the real database, the problem is back..

But I've compared the phpbb_config tables, there are the same. Same for the sessions table. An other table to check, maybe, but which one ?

EDIT : I found some informations about phpbb_sessions_keys. This are the autologin keys... So, I've got 9700 things in it : may I empty this table, to be sure ? There won't be any problem ?
User avatar
Pouzy
Registered User
Posts: 35
Joined: Wed Dec 29, 2004 9:56 am
Location: France
Contact:

Post by Pouzy »

Up :mrgreen:
espicom
Registered User
Posts: 17905
Joined: Wed Dec 22, 2004 1:14 am
Location: Woodstock, IL

Post by espicom »

truncating (not dropping) the sessions_keys table will make sure everyone has to log in the next time they arrive, and is one of the steps done in updating, so yes, you can remove the entries.
Jeff
Fixing 1016/1030/1034 Errors | (obsolete link) | MySQL 4.1/5.x Client Error | phpBBv2 Logo in ACP
Support requests via PM are ignored!
"To be fully alive is to feel that everything is possible." - Eric Hoffer
User avatar
Pouzy
Registered User
Posts: 35
Joined: Wed Dec 29, 2004 9:56 am
Location: France
Contact:

Post by Pouzy »

I don't understand the difference between dropping and truncating : truncating is just "washing" the entries ? And dropping is deleting ?
espicom
Registered User
Posts: 17905
Joined: Wed Dec 22, 2004 1:14 am
Location: Woodstock, IL

Post by espicom »

"Truncate" means, "Remove all entries from this table". "Drop" means "get rid of this table completely". If you drop the sessions_keys table, you will get errors.
Jeff
Fixing 1016/1030/1034 Errors | (obsolete link) | MySQL 4.1/5.x Client Error | phpBBv2 Logo in ACP
Support requests via PM are ignored!
"To be fully alive is to feel that everything is possible." - Eric Hoffer
Locked

Return to “2.0.x Support Forum”