Modifying session.save_path


#1

How would I go about changing the value for session.save_path?


#2

I think it depends upon what you are trying to do, overall.

To change it universally for php run from your domain, you would modify your php.ini file, and set the new value there.

http://wiki.dreamhost.com/PHP.ini
http://wiki.dreamhost.com/Custom_PHP.ini

You could also, of course, install your own PHP (see the “see also” section of either of the pages linked above for links)

You could also do it “on the fly” but this could be more complicated depending upon what you are trying to do,as you need to make sure to keep the new value set from page to page:

http://us.php.net/manual/en/function.session-save-path.php

Note: running PHP-CGI (the default on DreamHost), you cannot change this value via .htaccess.

–rlparker


#3

Thanks, the session-save-path function is what I was looking for.

Btw, what is the default path for sessions to be saved in on Dreamhost?


#4

You are welcome, and I’m glad you found the information helpful! :wink:

You should check on your own server using the output of phpinfo() to be certain how your PHP is configured, but I believe on DreamHost the default is /tmp (at least, that is how PHP on my servers is configured).

–rlparker


#5

So /home/.spinach/mysite.com/tmp?
How would I go about viewing the content of this folder?

Thanks so much for your help so far, you’ve been great.


#6

Nope … actually /tmp . It’s a “sibling” of (at the same level of the directory tree as) /home . Actually, it is a symlink to /usr/local/tmp which is owned by root (but you can read from and write to it)

[quote]
How would I go about viewing the content of this folder?[/quote]
Log into the shell with ssh, and use standard *nix tools to navigate to the directory, or use an sftp client and navigate to it that way.

–rlparker