Problem Moving PHP sessions to tmpfs (RAM) in Jessie Lite

I do not understand why but it seems impossible to move the php sessions path  simply by editing the file php.ini....

Find the line - ; session.save_path = "/var/lib/php5/sessions" and replace it with - session.save_path = "/tmp" 

It seems to have no effect... 

(after reboot the session path still in /var/lib/php5/sessions  and in /tmp there is no file..)

I could not change the path in two different installation emoncms on sd with jessie OS.
To solve the problem I created a partition in RAM with original path:

file /etc/fstab
tmpfs /var/lib/php5/sessions  tmpfs nodev,nosuid,size=30M,mode=1777 0 0

Ciao,

Fabrizio

Paul Reed's picture

Re: Problem Moving PHP sessions to tmpfs (RAM) in Jessie Lite

Did you have the following line in your fstab to mount /tmp in tmpfs;

tmpfs /tmp tmpfs nodev,nosuid,size=30M,mode=1777 0 0

This is what I get in my Jessie installation by making the changes that you did above;

pi@emon:~ $ ls -l /tmp
total 8
-rw------- 1 www-data www-data  85 Jan 19 18:25 sess_fqvh17pg2v96ooj5s04296d486
-rw------- 1 www-data www-data   0 Jan 19 18:22 sess_nh1883ttn4udrg03nem8vckkj4
-rw------- 1 root     root     241 Jan 18 19:40 tmp.HyVha9yTa9
pi@emon:~ $

 

Paul

 

 

 

fcattaneo's picture

Re: Problem Moving PHP sessions to tmpfs (RAM) in Jessie Lite

Yes i had this line :

tmpfs /tmp tmpfs nodev,nosuid,size=30M,mode=1777 0 0
 

and in php.ini changed 'session.save_path = "/tmp" '...

My installation is new Jessie lite ( Jessie without x-gui )

.....I can not understand what happened

 

In my php.ini the line :

; session.save_path = "/var/lib/php5/sessions"

start with  semicolon ';' ... as a comment ...

I change it in :

session.save_path = "/tmp".. but noting happen..

 

Fabrizio.

Paul Reed's picture

Re: Problem Moving PHP sessions to tmpfs (RAM) in Jessie Lite

'Jessie Lite'! - I'm definitely developing a dislike of these cut-down versions! (rant over..)
Sorry, can't help with this as I don't use Jessie Lite, I just know that it works OK in full fat Jessie, as per pasted result above.

Paul

Edit - title changed from 'Jessie' to 'Jessie Lite'.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.