session.save path broken |
session.save path broken |
Christian J |
Jan 5 2011, 10:44 AM
Post
#1
|
. Group: WDG Moderators Posts: 9,630 Joined: 10-August 06 Member No.: 7 |
(maybe this is the wrong sub-forum)
http://www.php.net/manual/en/ref.session.php#82987 wrote: session.save_path="C:\DOCUME~1\pjs9486\LOCALS~1\Temp\php\session" I apparently did the same thing during some recent Windows mainentance. Surely there must be a way to delete temporary files from your testing computer without having to recreate the session.save_path directories manually every time? |
Ephraim F. Moya |
Jan 8 2011, 01:12 PM
Post
#2
|
Advanced Member Group: Members Posts: 167 Joined: 2-September 07 From: New Mexico Member No.: 3,702 |
I would expect that the new session would be written to disk when the current session closes either explicitly or on reaching the end of the script although I couldn't find a site that said so. I did find that the session is NOT written if there is no change to the session.
So: do you have an explicit session_write() instruction before the end of your script? And ... do you actually change the session data? and Why don't you put your session temp directory somewhere that doesn't have the word 'Temp' in the path? |
Christian J |
Jan 8 2011, 02:44 PM
Post
#3
|
. Group: WDG Moderators Posts: 9,630 Joined: 10-August 06 Member No.: 7 |
I would expect that the new session would be written to disk when the current session closes either explicitly or on reaching the end of the script although I couldn't find a site that said so. I did find that the session is NOT written if there is no change to the session. When an empty temp directory is there I get no PHP warning, even though nothing is written to the directory. Seems session_start() wants to open and check the temp directory even if it's empty. QUOTE So: do you have an explicit session_write() instruction before the end of your script? I guess you meant session_write_close()? No. Would it matter if I have one, since it seems there must be a temp directory even if it's empty? Too bad PHP doesn't create a new one. Maybe I had to create it manually when I first started using sessions as well, can't remember. QUOTE Why don't you put your session temp directory somewhere that doesn't have the word 'Temp' in the path? That's a thought. I'll try it. |
Lo-Fi Version | Time is now: 28th March 2024 - 10:11 AM |