I had exactly the same problem yesterday with IIS, win xp pro and php sessions.
I would set a value in $_SESSION['count'] on one page and then it would not appear in the next page although the session id was the same on both pages.
It turned out to be the fact that I had copied a php.ini file which had a
session.save_pa th = "c:/PHP5/sessionfolder"
entry but the actual directory was not there..... as soon as I had created the directory, everything worked as I expected.
I had exactly the same problem yesterday with IIS, win xp pro and php sessions.
I would set a value in $_SESSION['count'] on one page and then it would not appear in the next page although the session id was the same on both pages.
It turned out to be the fact that I had copied a php.ini file which had a
session.save_pa th = "c:/PHP5/sessionfolder"
entry but the actual directory was not there..... as soon as I had created the directory, everything worked as I expected.
Hope that is your answer too.
The story at the moment for my session path is that the phpInfo() displays:
C:\Users\user\A ppData\Local\Te mp\php\session
This path is present and is fuly available. The php.ini file lists a path of:
C:\inetpub\phpS ession
Again this path exists and I have full access to it.
The ini file resides in C:\program files\PHP and is the one that phpInfo states is loaded.
This is the only php.ini file I can find on my local system, and as my system is standalone it can't be pulling any from a network location.
I'm really baffled by this and it is now halting development progress - never a nice feeling.
I really appreciate all the help so far and any further thoughts or suggestions are most welcome.
nathj
Further to my last post I have done a bit more digging and there are a few mysteries.
1) The phpInfo() reports a different file to the php.ini file, a bit of a mystery.
2) The path that phpInfo() lists I don't seem to have access to, I have tried setting this in Vista and while it says I have full permission it doesn't sem to list the special permissions as being available. However, I don't think that is the problem. I tried, via fopen and fwrite to write to a file in the directory phpInfo lists for sessions and failed, however if I try that to another directory with the same permissions it works fine.
3) I also tried chmod() on the file path in question and was told I did not have permission.
All of this suggests that I should use a different file location but how do I do that if the phpInfo() is not reading from the ini file I have?
can you see session records being stored within this location ?
I am running the same config on my development laptop and had more than a few issues with the new security settings in Vista..
Purple
Hi Purple,
Did you manage to get it working at all? I can see lots of information on the web stating that this is a problem with Vista, but there has to be a solution, doesn't there?
Comment