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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PHP Error (Bug)?

Status
Not open for further replies.

bgreenhouse

Technical User
Feb 20, 2000
231
CA
Hi Folks

I set up an application that worked fine on my computer. Then I got a static IP so I had to upgrade my security procedures a little more (not logon as Administrator all the time, give permissions to directories, etc...). I also upgraded to the newest verison of PHP (4.2.3?). Now I get an error message on a page that had worked fine before. I reinstalled the old version, but it doesn't seem to make a difference. The error says:
Code:
Warning: open(C:\PHP\sessiondata\sess_a0385b2570de61f0197e42068d475d14, O_RDWR) failed: m (13) in C:\Sites\bfhp\PHP\login.php on line 5

Warning: open(C:\PHP\sessiondata\sess_a0385b2570de61f0197e42068d475d14, O_RDWR) failed: m (13) in Unknown on line 0

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

That last error has been reported as a bug on bugs.php.net (or whatever the URL is). It doesn't seem to have been fixed. I'm astonished to not find any mention of it on Tek-tips though...Anyone figuredo ut how to work around it - or know what's wrong with my system? I'm running IIS 5

Thanks

Ben
 
Does the directory "C:\PHP\sessiondata" exist, and does the IIS user have permission to write to and read from that directory? ______________________________________________________________________
TANSTAAFL!
 
I should mention that line 5 (where the first error was) is:

Code:
session_start();

B
 
I assumed that from the filename specified in the warning.

Again, does the directory exist, and does the IIS user have the ability to read from and write to that directory? ______________________________________________________________________
TANSTAAFL!
 
Hi sleipnir214

Sorry about that - I had answered that but the phone rang and I must of forgotten to submit the final post. Yes, the directory exists, and IIS User (IUSR_ComputerName) has access. There are even a few session files in there from last night (when I was screwing around with the problem), so it has worked at times apparently.

Any other suggestions?

Ben
 
New Info - if I change session_autostart to 1 in php.ini, the first error line disappears, but the rest remain - I don't know what that means, but it may be significant.

B
 
Suppose you use fopen() and attempt to write to that directory. Do you get a similar message? ______________________________________________________________________
TANSTAAFL!
 
Alright - I figured it out. When I gave access to IUSR_computerName, I didn't look too hard at what the default settings were. By default, they are not granted write access. IUSR needs write access to sessiondata and uploadtemp. Thanks for your help.

B
 
From my earlier post:

does the IIS user have the ability to read from and write to that directory? ______________________________________________________________________
TANSTAAFL!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top