1 (edited by JeanC 2010-04-05 19:26)

Topic: logged in [solved]

Hello,
My forum is part of a website which has a menu with buttons. When you click the button for the forum I call an iframe and punbb starts.

echo "<iframe src=forum/index.php style=\"width:100%; height:3000; border:0; margin:0; padding:0;\" scrolling=no></iframe>";

I click Login on the forum and I get logged in.

Now the problem is that when I click on a button to go to another part of the site, and then come back to the forum I am not logged in anymore. It looks like by calling index.php the forum 'starts all over'?
Is there a way to stay logged in?

This is the site: http://planetdance.mine.nu

Re: logged in [solved]

What browser do you use? Maybe there is an issue with cookie and iframe in your browser. Please, try another one.

3 (edited by JeanC 2010-04-05 13:54)

Re: logged in [solved]

Thanks.

I tried latest opera, latest firefox and ie6. No difference.
I was thinking that maybe because the iframe reloads index.php everytime somehow the cookie data gets lost?

Edit: I use some simple ajax to handle those button clicks, maybe that is the cause?
Edit2: Using ajax or not seems to make no difference.

Could I force index.php to check if a cookie is set for the forum?

4 (edited by JeanC 2010-04-05 18:40)

Re: logged in [solved]

I looked a bit at the cookie behaviour.
If I login to the forum there are 3 cookies:

[forum_cookie_4c38ad]
[punbb_cookie]
[forum_cookie_69d348]

If I then go to some other part of the site and come back to the forum there is only this one cookie left [forum_cookie_4c38ad]
Untill I login, then there are the same three again.

Config.php has this entry btw: $cookie_name = 'forum_cookie_69d348';

Mystery to me, hope someone can shed a bit of light?

Yet another Edit: I found the cause. I was using the local ip 192.168.x.x to access the forum. When using the domain name I stay logged in.
'Problem' solved.