Cookie Issues

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Anti-Spam Guide
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
Locked
User avatar
Bard
Registered User
Posts: 449
Joined: Fri Sep 10, 2004 9:49 am
Location: Texas
Contact:

Cookie Issues

Post by Bard »

For the most part, I have not had problems with my cookies but I have noticed that every time a page or script has

Code: Select all

$user->session_begin();
in it I get logged out. I can comment out those lines and everything is ok. Any help on fixing this? I am referring to pages other than core phpbb pages that have that code.
A computer once beat me at chess, but it was no match for me at kick boxing.
Old Time Radio Talk | Visit OTR Talk Town
User avatar
Brf
Support Team Member
Support Team Member
Posts: 52111
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: Cookie Issues

Post by Brf »

You are talking about pages you have written yourself?
User avatar
Bard
Registered User
Posts: 449
Joined: Fri Sep 10, 2004 9:49 am
Location: Texas
Contact:

Re: Cookie Issues

Post by Bard »

Brf wrote:You are talking about pages you have written yourself?
Yes and scripts from other mods.

What I have noticed is that:
1. no sid appears to be appended to the url as I browse my site
2. there is no www. in the url as I browse my site.

When I first login or logout then you can see that the sid has been appended to the url
A computer once beat me at chess, but it was no match for me at kick boxing.
Old Time Radio Talk | Visit OTR Talk Town
User avatar
Brf
Support Team Member
Support Team Member
Posts: 52111
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: Cookie Issues

Post by Brf »

A sid is not appended to the URL if a proper cookie can be written.
Are you using append_sid() to create the link to you new pages? That will add the sid to the URL if a proper cookie cannot be written.
User avatar
Bard
Registered User
Posts: 449
Joined: Fri Sep 10, 2004 9:49 am
Location: Texas
Contact:

Re: Cookie Issues

Post by Bard »

Is it normal for $user->session_begin(); to log you out?
A computer once beat me at chess, but it was no match for me at kick boxing.
Old Time Radio Talk | Visit OTR Talk Town
User avatar
Brf
Support Team Member
Support Team Member
Posts: 52111
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: Cookie Issues

Post by Brf »

Yes. If you do not have a proper cookie, and the sid is not attached to the URL.
Locked

Return to “[3.0.x] Support Forum”