If you are getting some weird error messages when trying to login to your Admin Panel, and the error messages look something like the following...
Warning: session_start(): open(/any/folder/name/here) failed: Permission denied
Then your server is having problems creating, storing or reading php's session files. This article will help you work through this issue.
Session.save_path is a PHP directive which needs to be set in your PHP configuration settings (the php.ini file). It is unusual to encounter problems with this in a shared hosting environment as it is a standard PHP setting that most hosts enable. However, sometimes hosts don't set it correctly.
If you have set up your own server, you will need to edit your php.ini file to enable PHP sessions.
Please Note: this is NOT an Ultimate Locator issue. PHP is designed to handle sessions and almost every dynamic script requires the use of sessions.
To check if session.save_path is set on your web server space, create a file with a text editor, calling it info.php (you can call it anything you like as long as you create the file with the .php extension).
In the file, put this one line of code:
<?php phpinfo(); ?>
Upload the file to your site, then call it in your web browser, eg. http://yourdomain.com/info.php
Look for the entry that says: session.save_path = path/to/sessions/file
If there is no file entered, then you do not have a session.save_path set up. If there is a file entered, check that it exists and is writeable.
If you are using a hosted account for your web site and there is no session.save_path entered, or it is not writeable - contact your host and ask them to change this.
Sometimes, the sessions file is writeable, but the file ownership is not set for it to be writeable by Ultimate Locator. Again, this is a matter for your host.
What happens if my host won't help?
- Consider changing hosts (you pay them for their service after all!)
- Or try .htaccess
This will work in the following situations:
- PHP is run as a module under Apache (mod_php)
- Your host has allowed .htaccess overrides (if you already successfully use an .htaccess file, then your server space most likely meets both these requirements)
It won't work in these situations:
- You are running PHP under CGI (eg. suexec)
- You are running your site on a Windows server or IIS
Either open an .htaccess file you already have in the public html of your site and enter this directive, or create an .htaccess file with your text editor and upload it to your public http space:
php_value session.save_path '/path/to/a/writeable/folder'
If you do not already have a sessions folder to use, create one and make sure the path is correct.
Because the sessions folder accumulates all kinds of information about your site, it should NOT be placed within any public area of your web space. For your site's security, it should be created outside the public_html or www area, in the root of your server space, not your web root.
Changing php.ini yourself:
The format to use in your php.ini file is as follows:
session.save_path = w:/tmp
Windows users may need to change this to:
session.save_path = w:\tmp (usually the forward slash delimiter works just fine).
Session.save_path is a PHP directive which needs to set by your hosting company. If you get messages while logging into your Ultimate Locator Admin Panel, that say that session save path is not set or is unwriteable, you should really contact your host and alert them to the problem and ask for thier help.