PHP Bulletin Board Home
News About Home
Features of phpBB Test drive phpBB Downloads Support for phpBB The phpBB Community Styles for customising phpBB 3rd party modifications to phpBB

Support Home | Knowledge Base Home | Submit Article | Search Articles | Browse Articles
 Cookies and phpbb 
Description: A brief description of cookies and how they work and a guide to the cookie options available in the ACP.
Author: Callisto
Date: Sat Apr 05, 2003 1:54 pm
Type: Info
Keywords: cookies, cookie, auto login, automatic login
Category: Miscellanea
Cookies are small text files created when you visit a web site that includes a command to create them. The file contain pieces of information stored in a folder on your computer ready to be accessed again in the future. They allow information to be stored that is specific to you which allows the web site the retrieve that information next time you visit the site. For example, cookies are used to save personalized settings from web sites, to store shopping basket content on some online shops and to store information about the number of times the visitor has visited a web site, to name a few. It is important to note that only the web site that set the cookie can have access to it and that a web site cannot access cookies already stored by other sites.

Cookies are used within phpBB2 for a number of things, the main one being the automatic login feature. When you click the ‘Log Me In Automatically’ box available on most forums, phpBB will set a cookie with your information in. Next time you visit the forums, you will be automatically logged in!

There are many topics on the phpBB support forums regarding the inability to keep users logged in or the cookies not working properly. Here is a guide to what each option is on your configuration screen:

Cookie Domain: This is default on most forums as your domain name without the http:// part. This tells the cookie which site set it and allows that site to retrieve it. This is the most commonly incorrectly set option and if set incorrectly, will lead to the inability to stay logged in.

Cookie Name: This is set as default as phpbb2mysql and is just the name that the cookie is given when being stored. It doesn't matter what this is set as but changing it will cause all the cookies to be needed to be added again. It is advised to give the cookie a name. If you are running multiple forums on the same server, it is advisable to have a different cookie name for each forum.

Cookie Path: This is where the cookie is directed to and is defaulted as / but this will depend on your forum location in your site directory. A common mistake here to put the URL (i.e. http://www.yoursite.com) as the path which is incorrect.

Cookie Secure: If you are running SSL on your site with the forums loaded with it, then enable this option to make the cookies secure.

Session Length: This sets how the long each user session lasts – if the user does not do anything for the number of seconds set here, they are logged out. The default of 3600 is usually fine for most boards.

FAQ:

All of these are taken from real questions asked on the Support Forums of phpBB.com

Users are being logged out after a few minutes even though I have the settings correctly setup:
The most likely cause for this is that the server is not set up correctly to use sessions. The cause of this was put down to a limitation in the Yahoo hosting system.
The Log Me In Automatically Box is not working:
This is because you have not set up the cookie domain or path correctly. Read the above information and double check your setup.
The cookie features are working for me but not for some of my members:
The members most likely have the cookie security settings set to disallow cookies. Tell them to change them to allow cookies completely or just from your site. IE6 has improved features for this and your members might have messed with the settings.
I have moved my forums to a new server and a new domain name and now the cookie features aren't working:
Make sure you have updated the cookie settings in your control panel to reflect the changes to your host and domain name.

If you are experiencing problems, then so a search on the phpBB Support forums before posting as many issues have been covered before.

Finally, a useful guide to how cookies work and what they do plus information about laws etc can be found at http://www.cookiecentral.com/

Username: Password:
News | Features | Demo | Downloads | Support | Community | Styles | Mods | Links | Merchandise | About | Home
 © Copyright 2002 The phpBB Group.