Several big hosting services use a pool of web servers which are controlled by a load balancing system. Often, these web servers each have their own location for storing PHP's temporary data used for maintaining sessions. This gives problems to keep track of sessions used by UseBB.
Symptoms
- UseBB throws General Errors: You regurarily receive Undefined index errors or similar.
- Difficulties registering an account: You just return to the Terms Of Use or the registration form without a warning or note of any kind.
- You can't stay logged in: You are many times logged out automatically.
Note: not all symptoms might occur.
Resolution
Since this problem is considered a result of a bad configuration of the web servers (the location for temporary information storage by PHP should be shared by all servers), we won't change the method of saving temporary session data in UseBB. There is, however, a method implemented to workaround this problem.
Creating a custom tmp directory
First, create a new directory within your webspace. Name it tmp or something similar. You may already have such a directory within your range, which you can also use if you are sure this won't give problems. Make sure the directory is writable by the web server. Eventually perform a chmod 0777 on it.
mkdir tmp
chmod 0777 tmp
Changing UseBB's configuration
Edit config.php with a text editor and search the line starting with $conf['session_save_path']. Edit the value so it matches the complete path to the tmp directory. To find out what the complete path is, place a .php script in the tmp directory containing
<?php
echo realpath('./');
?>
From now on, maintaining PHP sessions should not be a problem anymore.
Known hosting services with this problem
- SourceForge.net - web hosting capability for hosted projects.
_______________
« Last edit by Dietrich on Sun Jul 08, 2007 2:48 pm. »

