Forum Moderators: coopster

Message Too Old, No Replies

PHP session logging errors (local machine)

         

cookie2

5:55 pm on Jan 30, 2004 (gmt 0)

10+ Year Member



I'm working on a login script. I'm slowly debugging the code to get it working but I have run across one that I don't know how to correct. It's about the session logging. From my Apache error log:

[Fri Jan 30 12:42:18 2004] [error] [client 127.0.0.1] PHP Warning: Unknown(): open(/temp\sess_8544215658f66aa67d7717909462fc42, O_RDWR) failed: Permission denied (13) in Unknown on line 0, referer: [localhost...]

[Fri Jan 30 12:42:18 2004] [error] [client 127.0.0.1] PHP Warning: Unknown(): Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/temp) in Unknown on line 0, referer: [localhost...]

Now I know that normally those kind of errors are chmod errors when files are on the server. But what can I do to fix this on my own machine? I can't chmod a local folder, can I? Any suggestions?

WinXP/Apache2.0.43/PHP 4.3.3

Reflection

7:53 pm on Jan 30, 2004 (gmt 0)

10+ Year Member



Have you made sure that folder actually exists?

Timotheos

9:37 pm on Jan 30, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Check this in the manual [php.net]

Note: Windows users have to change this variable in order to use PHP's session functions. Make sure to specify a valid path, e.g.: c:/temp.

cookie2

12:22 am on Jan 31, 2004 (gmt 0)

10+ Year Member



Thank you both for your comments. It looks like you were both right.

The error came because the folder didn't exist. But I thought it was set correctly in php.ini (as /temp) figuring it was looking for the file starting from my localhost DocumentRoot folder. But it wasn't.

So I reset the php.ini session.save.path to c:\temp and the error is now gone. Thanks for the help.