A tale of two sites: an odd sighting of the php/session.save_path error

Permalink
I won't be surprised if I don't get many replies to this. In the first place, it involves the less-supported IIS7 web server. In the second place, it's a real puzzler.

I've got two separate C5 sites running on IIS7. They each are configured as separate web sites (other than the default), and each have their own IP address. They were both set up in IIS7 exactly the same way. Both sites are using C5 5.5, though I also tried it with 5.4, and got the same thing.

One installed with no errors and runs with no errors.

The other one cannot install because it's throwing the following error:
Warning: Unknown: open(C:\Windows\Temp\sess_ta5gm8h1cipkglm03ljpu8rb52, O_RDWR) failed: Permission denied (13) in Unknown on line 0 Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (C:\Windows\Temp) in Unknown on line 0


They both are using the exact same PHP via FastCGI handler.

They both are running under the exact same system account, therefore both have exactly the same privileges in the system.

If one site is throwing errors, shouldn't the other one as well?

What I have tried so far:

- Double-checked to make sure both sites were using the exact same php handler, and it pointed to the same php executable. Check.

- Added all the IIS system accounts to the session.save_path directory. Results: no change.

- Created another directory, gave all the IIS sytem accounts read/write access to it, and pointed session.save_paths there. Result: the good site broke and started throwing the same error. The bad site continued throwing the same error.

The fact that one site is working perfectly, and another isn't seems to suggest something different between how the two sites are set up, but I have exhausted all the possibilities I know of.

Any ideas would be greatly appreciated, and thanks in advance for any effort made to reply.

landollweb
 
Steevb replied on at Permalink Reply
Steevb
Just to let you know...

I have no idea what you are talking about, does that help?

Is there a typo somewhere?

I can only guess that it's an input error...

...But I'm only clutching at straws!

I had an error once because of a colon should have been a semicolon in line 7674

WTF??

Took me hours to work out...
landollweb replied on at Permalink Reply
landollweb
Thanks for taking the time to hazard a WAG, 55.

When I said I set both sites up exactly the same way, I mean, as closely to exactly the same way as I could tell. I have not ruled out the possibility of having made an obscure little typo somewhere when I set up the second site. I was hoping someone with some knowledge of using php on a IIS server might have a more specific idea where to look for the problem, since I've been over all the settings 3 or 4 times, and not found anything different between the two, other than the IP address.

I think it's safe to rule out anything with the configuration of the server itself, since I already have another C5 site running perfectly on it. It most likely comes down to how the site itself was set up.

They both are running "as" the same user, so they both should have the same permissions throughout the server file system. Neither of them, by the way, has any permissions in the directory in question, which is kind of vexing in itself. I would think neither site would run in that case, but site 1 does.

I've searched through the error and event logs, and there's nothing showing up there.

If there are no further responses, I'll just keep digging until I finally get to the bottom of it. At least with one of the two sites working, I know it *can* work!
hostco replied on at Permalink Best Answer Reply
hostco
If you have root access to the server go to the /temp directory and delete sess_ta5gm8h1cipkglm03ljpu8rb52

Actually just delete all the temp session files and see if that helps.
Mnkras replied on at Permalink Reply
Mnkras
It could be 1 of 2 things,

1. Your server has run out of space, delete stuff.

2. the session.save_path is set to a direct that php cannot write to. If so, just google how to set your session.save_path

Mike
landollweb replied on at Permalink Reply
landollweb
I would have thought so, too, but since I had one site getting to the directory with the same set of credentials that the broken site was using, I ruled that out.

Hostco gets the cigar. Deleting the temp files cleared up the problem.

Thanks very much for the assist, guys!
hostco replied on at Permalink Reply
hostco
Oh thats right Mike, I forgot to add to make sure the /temp directory is writable.
hostco replied on at Permalink Reply
hostco
No problem landollweb. Glad we were able to help out. Thanks for the cigar ;)
pixeldevops replied on at Permalink Reply
I have the same problem developing locally on win7 but the same code on my laptop win8 does not encounter this error. This error also occurs on a fresh install of c5 using the default theme without any edits.
I am under the impression this is a win7 issue, i.e. the system does not allow or listen to write permissions on the tmp directory. I have tried to remove the system attribute on the tmp dir: attrib -r -s drive:\<path>\<foldername> without success.
Deleting the session files and clearing the cache does help, but if the error is ignored too many times something happens to the database and information becomes lost.
I still havent found a solution, just sharing my 2 cents worth.
pixeldevops replied on at Permalink Reply
I have the same problem developing locally on win7 but the same code on my laptop win8 does not encounter this error. This error also occurs on a fresh install of c5 using the default theme without any edits.
I am under the impression this is a win7 issue, i.e. the system does not allow or listen to write permissions on the tmp directory. I have tried to remove the system attribute on the tmp dir: attrib -r -s drive:\<path>\<foldername> without success.
Deleting the session files and clearing the cache does help, but if the error is ignored too many times something happens to the database and information becomes lost.
I still havent found a solution, just sharing my 2 cents worth.