session_start on IIS suddently stopped working

I have my php files on an IIS 8 server.
I put a session_start on the top of the page.

My code was working fine. I moved it to a new folder. It worked for 5 minutes, and then I got this error:

Warning: session_start(): open(C:\Windows\temp\sess_69voc1ru64hq9ipmqm8llpdqn4, O_RDWR) failed: Invalid argument (22) in \\19******de.php on line 3
Success
Warning: Unknown: open(C:\Windows\temp\sess_69voc1ru64hq9ipmqm8llpdqn4, O_RDWR) failed: Invalid argument (22) 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

Open in new window


I set up a new folder, tried it there and it worked, and then 5 minutes later it started erroring again.

what can I do to make it work?
rivkamakAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dave BaldwinFixer of ProblemsCommented:
Normally I would think it was a permissions problem but that should show up immediately.  I am suspecting that your anti-virus is deciding that what you are doing is "bad behavior" and blocking it after a little usage.

I have PHP in 'C:\PHP' so I create a 'save' directory for sessions info at 'C:\PHP\save\'.  Then I edit the permissions to make sure the IUSRS... and the IUSR users have read/write permission.  Then if I have to I will tell my anti-virus to stay out of that directory.
0
rivkamakAuthor Commented:
The real question is that is keeps going up and down. It doesn't work, and then suddenly it will start working again,
then 1 hr later all the pages go down again.
0
Dave BaldwinFixer of ProblemsCommented:
I think the 'real answer' is that your anti-virus is interfering.  The default for "session.save_path" is blank which make PHP use the Windows 'temp' directory.  Before your question, I had 4 Windows 7 computers using that without any problems.  I changed that because I didn't want my session data comingled with all that other stuff.
0
rivkamakAuthor Commented:
We had to restart our server and now it works fine.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
rivkamakAuthor Commented:
Nothing else worked
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
iis8

From novice to tech pro — start learning today.