|
Search:     Advanced search
Browse by category:
Glossary

session save path issues

Add comment
Votes: 0
Comments: 0
Posted: 22 Mar, 2008
by: Pope L.
Updated: 02 Aug, 2008
by: Pope L.
There are two issues that often bring people to the forums looking for answers. Hopefully, this FAQ will help if you get either of these two warnings with your Mambo site :

session save path Unwriteable
or
session save path Not Set

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 a Mambo 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 Mambo. 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
.htaccess workaround:
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.

Important!
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).

Summary:
Session.save_path is a PHP directive which needs to set by your hosting company. If you get messages on installing Mambo, that say that session save path is not set or is unwriteable, you should really contact your host and alert them to the problem.
Others in this Category
document How secure is Mambo?
document Blocking direct access to scripts in your wrapper
document How to install templates on your Mambo site
document How to move your Mambo site
document How to change the template name
document Troubleshooting the WYSIWYG editor
document Lost your admin password?
document Database function failed with error 1054
document Popups not working?
document Incorrect Itemid's
document CAPTCHA not working
document Working with META tags
document Blank or 'White' Pages
document How to turn off MySQL Strict Mode
document FAQ: "This Category is currently empty"
document How to find your version of PHP & other useful information
document What to do when you get a site is temporarily unavailable error
document Changing/Creating your own favicon
document FAQ: Checked In/ Checked Out
document How to use Mambo Modules
document How to determine Absolute Path

RSS