Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Session tmp directory problem

Status
Not open for further replies.

KempCGDR

Programmer
Joined
Jan 10, 2003
Messages
445
Location
GB
Hi, I just installed Apache 1.3.28, php 4.3.3 and mySQL 4.0.14 on my WinXP machine (home development). I still can't believe I got them to work :) first time. Anyway, everything works fine, except for anything to do with sessions, I get the following error:

Warning: session_start(): open(/tmp\sess_ffbb6a546b1f3207780a0aacd2fa19a0, O_RDWR) failed: No such file or directory (2) in c:\localwebserv\ on line 3

Obviously the problem originates when it hits the session_start() command, and it can't do anything with the tmp directory. Can this be solved by simply creating a directory called that somewhere, or do I have to mess around with the settings again? (Or something else entirely).

Thanks.
 
You should create the folder that holds the session files. Make sure that the XP permissions are set so the user as which PHP/Apache runs has access privileges.
No need to go into any ini files.
 
Where does the folder need to be? I tried in the php install directory, but that still didn't work.
 
The setting is in the php.ini and the parameter is:
Code:
session.save_path
There should be tha full path. You can change it to whatever you want, e.g.
Code:
session.save_path         ="C:\Program Files\PHP\tmp\"; argument passed to save_handler
                                    ; in the case of files, this is the
                                    ; path where data files are stored
 
Thanks, figured it out about 5 secs before I got the reply email. Great minds think alike :)

Changed it to c:\LocalWebServ\tmp and all is well once again (for a few mins anyway, going to start enabling extensions now)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top