I'm glad people are still getting some mileage out of this 'hack' - but on balance I do believe it is the worst of about four different options.
Whilst it works it is 'volatile' - every time a change is made to global configuration the edit will be lost.
Here is a copy of my standard advice on the matter - produced here en masse - to save me having to type it all out (again):
When you installed did you notice a warning about 'session save path unwriteable'?
Here are the telltale signs.
- You can login to the front end but not the backend
- You do NOT receive an incorrect username/password message - you are just dumped back to login screen.
If this is you then there are three solutions:
a) edit php.ini (a server configuration file) if you have access to, or control of, the server.
If you don't have access to the server - you could ask your host.
b) edit .htaccess file and add the following line:
This option is useful if php is being run as a server module (isapi) - but not if run through CGI.
If you don't know what that means - either suck it and see, or check out PHP system info.
Code:
php_value session.save_path '/path/to/a/writeable/folder'
(change '/path/to/a/writeable/folder' to a folder that is actually writable)
create the folder first if you need to - ideally put it above your /public_html/ or /wwwroot/ folder
c) If PHP is being run as CGI on your server - or if trying the .htaccess method didn't work
You may be able to create a 'local' php.ini file in your folders. With this method you can override the main php.ini settings on a folder by folder basis. This is important FOLDER BY FOLDER. This means that each folder that contains an executable php script must have its own php.ini file. So your main Joomla folder, your /administrator/ folder and perhaps some of the sub-folders within /administrator/ too - as they contain utility scripts - such as file uploads - that may be called directly.
The format of the setting to place into your php.ini file is as follows:
session.save_path = w:/tmp
NOTE: even on windows systems the forward slash is the preferred directory separator.
Drive letters are optional and in most cases can be omitted - so the path would start with an initial forward slash /tmp
No quotes are required - unless the path contains spaces (which ideally it should NOT)
d) if .htaccess files are something that you are not comfortable with - or your host doesn't allow them to be used this way:
you could add the following line somewhere in Joomla's php code
Code:
session_save_path('/path/to/a/writeable/folder');
The easiest place to add it is within configuration.php - BUT - if you (or any component) changes any 'Global config' settings the edit will be lost and will need to be replaced.
Again point the path to a folder that you can make writeable
You could copy the value of $mosConfig_absolute_path and append '/sessions' (without the quotes)
Then make a folder called sessions and ensure it has permissions of 755.
Contacting your host requesting assistance is still the preferred solution.