![]() |
| Home | Apache | PHP | Ubuntu | MySQL | Linux | HTML | Win | CSS | Perl | Javascript | Rants | Retro |
|
||
| session.save_path. Change the PHP session path I encountered an issue with my website. Every so often the session would just die for no apparent reason, leaving the user logged out. This created php session errors which could only be removed by clearing the complete history in the browser. My hosts recommended I change the path where sessions where saved to so I did the following. I created a folder in my webspace called sessions. I chmod this folder to 775, so the session could be written inside the folder. I then created an .htaccess file and entered the following code. php_value session.save_path /home/[user]/www/sessions I saved the .htaccess and uploaded the file to my root directory of my webspace, i.e inside the www folder. Remember to change user to your username in the path So far so good. When a session is created I can see it appear in the sessions folder. When I delete my session I can the session change to 0 bytes. I have not experienced the session error since. |