Difference between revisions of "Session save path"

From Joomla! Documentation

 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{cookiejar}} {{underconstruction}}
+
 
Session save path : Unwriteable
+
 
 +
 
 +
When installing Joomla! or visting Global Configuration (some extensions may also display this information) you may see a warning about Session save path being unwriteable. This means that the directory used to save information relating to a logged-in user's session cannot be written into - preventing the necessary data from being stored.
 +
 
 +
 
 +
 
 +
 
 +
 
 +
== Joomla 1.0 ==
 +
 
 +
Generally this means that the user running the webserver's process (often a user called Apache) is unable to store files in the directory. This error should not be caused by this issue in later versions of Joomla! as sessions are saved to a folder within the Joomla directory structure.
 +
 
 +
 
 +
 
  
 
Solution:
 
Solution:
 +
 +
'''Windows'''
 +
  
 
Find the file php.ini, this is located in the same director as the installation of PHP
 
Find the file php.ini, this is located in the same director as the installation of PHP
Line 10: Line 26:
 
session.save_path="C:\DOCUME~1\username\LOCALS~1\Temp\php\session"
 
session.save_path="C:\DOCUME~1\username\LOCALS~1\Temp\php\session"
  
We need to make this directory writable C:\DOCUME~1\username\LOCALS~1\Temp\php\session.
+
We need to make this directory writable C:\DOCUME~1\username\LOCALS~1\Temp\php\session. for the user.
 +
 
 +
 
 +
'''Linux'''
 +
 
 +
 
 +
On Linux Systems the php.ini will probably use /var/lib/php/session folder.
 +
 
 +
How you update the permissions on this folder is entirely dependant on the setup of your server. If you use SuExec (so processes are run by different users) the easiest way is to ensure that all relevant users are in a user group and then assign the group permissions
 +
 
 +
chgrp /var/lib/php/session
 +
chmod g+w /lib/php/session
  
 +
If it's only ever the apache user that runs your serving processes, you can simply change the permissions to ensure that the folder is owned by the apache user
  
On Linux Systems the php.ini will probably use /tmp folder. <br>
+
chown apache /var/lib/php/session
If you do not want to make the whole folder writable you can change the php.ini setting to<br>
 
e. g. /tmp/joomla<br>
 
and creating that new folder by typing (as root)<br>
 
mkdir -m 777 /tmp/joomla
 

Latest revision as of 17:15, 8 October 2012


When installing Joomla! or visting Global Configuration (some extensions may also display this information) you may see a warning about Session save path being unwriteable. This means that the directory used to save information relating to a logged-in user's session cannot be written into - preventing the necessary data from being stored.



Joomla 1.0[edit]

Generally this means that the user running the webserver's process (often a user called Apache) is unable to store files in the directory. This error should not be caused by this issue in later versions of Joomla! as sessions are saved to a folder within the Joomla directory structure.



Solution:

Windows


Find the file php.ini, this is located in the same director as the installation of PHP

Open the file in a text editor and find session.savepath, this will look like :

session.save_path="C:\DOCUME~1\username\LOCALS~1\Temp\php\session"

We need to make this directory writable C:\DOCUME~1\username\LOCALS~1\Temp\php\session. for the user.


Linux


On Linux Systems the php.ini will probably use /var/lib/php/session folder.

How you update the permissions on this folder is entirely dependant on the setup of your server. If you use SuExec (so processes are run by different users) the easiest way is to ensure that all relevant users are in a user group and then assign the group permissions

chgrp /var/lib/php/session chmod g+w /lib/php/session

If it's only ever the apache user that runs your serving processes, you can simply change the permissions to ensure that the folder is owned by the apache user

chown apache /var/lib/php/session