Session save path in php.ini commented

4u123

Well-Known Member
PartnerNOC
Jan 2, 2006
931
21
168
Hi, Can someone please advise if its OK to uncomment the session save path in php.ini ? Its set to /tmp which is where sessions should be saved anyway but for some reason it is commented out by default. (php5)

Is it safe to simply uncomment it ?
 

guysmiley

Member
Sep 6, 2008
19
0
51
I have the same question... Should this not accelerate php? I question it only because the default WHM configuration has no defined session save path.

Anyone?
 

Ghulam Yaseen

Well-Known Member
Mar 14, 2008
49
0
56
Karachi,Pakistan
Yaseen

Hello :),

session.save_path = /tmp ( this means that session file will be rewritable)
uncomment this if you are installing the joomla like module of php and do not fear of setting things like this:cool:

Hi, Can someone please advise if its OK to uncomment the session save path in php.ini ? Its set to /tmp which is where sessions should be saved anyway but for some reason it is commented out by default. (php5)

Is it safe to simply uncomment it ?
 

guysmiley

Member
Sep 6, 2008
19
0
51
I think you misunderstand.

The master php session save path, as specified in WHM, is 'N;/path'. Does this mean it's disabled? Is this right?
 

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,216
12
313
Houston, TX
cPanel Access Level
Root Administrator
I think you misunderstand.

The master php session save path, as specified in WHM, is 'N;/path'. Does this mean it's disabled? Is this right?
No, this means the default value is being used. Remember, this configuration entry can take the form of <numerical value>;<path> (without the angle brackets, of course).
 

neorder

Well-Known Member
Jun 16, 2003
55
0
156
so we should or shouldn't not comment it out "session.save_path = /tmp"?

we've got many this errors:

PHP Warning: PHP Startup: mm_create(0, /session_mm_cgi585) failed, err mm:core: failed to open semaphore file (Permission denied) in Unknown on line 0
 

jols

Well-Known Member
Mar 13, 2004
1,110
3
168
I would like to know this as well. Apparently our hosted members can not install SugarCE because the installation process dies on:

Session Save Path Setting The session.save_path setting in your php configuration file (php.ini) is not set or is set to a folder which did not exist.

So, if we simply uncomment the value in question in the server's global php.ini file I think they will be able to get past this point in the installation process, BUT, will it cause other errors on the server if we do this?
 

4u123

Well-Known Member
PartnerNOC
Jan 2, 2006
931
21
168
The answer is that its a standard php.ini file default setting. By default PHP will use /tmp anyway if this is commented out. Some software requires that the path be specifically set - in which case just uncomment it. At the end of the day - you should set it to whatever you want it to be. It does no harm to uncomment that entry and set it specifically to /tmp.
 

jols

Well-Known Member
Mar 13, 2004
1,110
3
168
The answer is that its a standard php.ini file default setting. By default PHP will use /tmp anyway if this is commented out. Some software requires that the path be specifically set - in which case just uncomment it. At the end of the day - you should set it to whatever you want it to be. It does no harm to uncomment that entry and set it specifically to /tmp.
Okay, so I assume that if I do this, it will not mess up other script packages that use other-than-the-default to store session files?
 

4u123

Well-Known Member
PartnerNOC
Jan 2, 2006
931
21
168
Okay, so I assume that if I do this, it will not mess up other script packages that use other-than-the-default to store session files?
The changes you make to the php.ini on the server are global. Sites on your server can only use the setting provided in php.ini unless they are using an ini_set overrride or a php.ini of their own.

PHP itself will always default to /tmp if you dont specify the session save path - i.e it is commented out. Therefore all sites on your server will use /tmp by default. If you specify /tmp instead of commenting it out - all sites will still use /tmp. They can only use an other-than-the-default setting if they are overriding the main php.ini in which case they will only be changing their own settings anyway.
 

jols

Well-Known Member
Mar 13, 2004
1,110
3
168
Okay cool. So if I have all this straight, then no-harm-done either way (?).