Page 1 of 1

Session.save_path setup

Posted: Thu Apr 25, 2002 8:47 pm
by Fixate
I'm having trouble setting up the php.ini so that it has a proper save path for sessions.

it says in the ini "Note: Windows users have to change this
variable in order to use PHP's session functions."
session.save_path = /tmp

i'm on windows and i'm not sure where to direct the path.

ANy help on the matter would be great..... this is the error i getting when running a script.

Warning: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0

Posted: Fri Apr 26, 2002 3:23 am
by chiefmonkey
What to do is create a folder on your hard drive to hold your session info, in my case it sits in my php folder. As an example let's say you are running WIN2K, and you create a folder within your WINNT folder and call it "session_data" without the quote marks then you simply map out the path to this folder in you php.ini which would be

session.save_path = c:/WINNT/session_data

restart apache just to make sure and that should be you

HTH

George

Posted: Fri Apr 26, 2002 3:10 pm
by Craig
just create the folder tmp = c: mp that's what I did!

Posted: Fri Apr 26, 2002 3:58 pm
by sam
The best place I have found it to create a folder called sessions or something in your php or logs directory (to keep it off ot the C:> and keep your computer clean) then just chenge the line to:

session.save_path=D:/httpd/php/sessions

BUt that is just MHO, I don't think that using the windows NT directory is a good idea atall, you shouldn't have temporary data being stored next to system files (paranoid I am).

Cheers Moe

Posted: Sun Apr 28, 2002 6:47 am
by chiefmonkey
sam wrote: BUt that is just MHO, I don't think that using the windows NT directory is a good idea atall, you shouldn't have temporary data being stored next to system files (paranoid I am).

Cheers Moe
I don't see what difference it makes, although I admit I'm not a windoze expert, but I am willing to listen as to why it shouldn't be done.

George

Posted: Sun Apr 28, 2002 2:41 pm
by sam
Well here is the way that I have always set up my windows nt/2000 servers. I create a partition or disk for the operating system. I create one for the database I have one for the web root and one for logs and temp data. If you put the sessions directory in the windows partition, with enugh hits your windows partition might become clogged and your entire wywtem will slow down. Just pesonal opinion.

Cheers Sam

Posted: Mon Apr 29, 2002 3:26 am
by chiefmonkey
Sam,

If you are talking about a production server then of course what you say makes sense, but when I think of windows/php combo I always think for testing purposes, infact I don't know of any Windows hosts who offer PHP, that may change as PHP matures and and the ISAPI module becomes more stable

George

Posted: Mon Apr 29, 2002 11:18 am
by sam
Sure I guess I was. With php 4.2.0 and the upcoming 4.3.0 and apache 2.0.x I think that windows hosting is going to become a php mainstay, they will beable to offer the best of the unix and windows worlds... I also like to keep every thing out of my windows directory because I frequently format it and reinstall windows (4 times already this week :) ).

That brings up another question, does anyone know if you can mask the php.ini file. IE add a file with a few lines pointing to another location. I hate haveing to create a new one every time I format my c: drive and I keep forgetting to save a backup.

Cheers Sam