Change PHP Session Files Location

software development

#1

I’m trying to work out how to control the length of time that php Sessions remain alive. As a first step, I have created a custom php.ini file (as per the DH Wiki) at:

/home/.highlite/myUserName/myDomain.com/cgi-bin

I would like to store the Session files in my own temp folder, instead of the default: session.save_path = “/tmp”.

I’d like it to be at:

/home/.highlite/myUserName/myDomain.com/cgi-bin/tmp

I’m unsure of how I should enter this (and I don’t want to risk screwing up my web app!). Should I enter the whole path, or should it be ‘relative’?

MTIA


#2

Enter the entire path except for the “.highlite” part. In other words: session.save_path="/home/myUserName/myDomain.com/cgi-bin/tmp"


#3

Ok, thanks for that!