Thanks for responding.
I am testing sessions on my local pc for a captcha fix for a guestbook.
I am using XP Pro/IIS6/Php 4.3.7/Dreamweaver CS3.
The session.save_path in my php.ini has C:\PHP\sessiondata.
In my guestbook form I have:
@session_start();
just before my <body> tag. On submit I goto addguestbookentry.php where I test to see if the captcha var sent by the post method matches the same var sent by the session.
All works well until I put the pages up on the server. They require a path.
So getting that to work locally first I put in:
session_save_path("C:\PHP\sessiondata");
@session_start();
and that works great. The Php.ini and my path are the same. If I try to use a dir I created it opens the session file in that path but writes no data.
In that tmp dir I made sure it is shared with write permissions. I right clicked on the dir and made sure it has all permissions and then also 'shared' via windows explorer.
Doesn't help. Went ahead for a test and 'shared' my whole c drive and that didn't help.
Tried using session_save_path("C:\PHP\sessiondata\tmp"); just to see if that would work but still only opens the sesson file but does not write anything. Of course I 'shared' the tmp dir and gave it all permissions.
Seems like the above should work but things only work if I match the dir with the one stated in the php.ini.
Another funny thing that is bugging me. If I use:
session_save_path("C:\PHP\sessiondata\tmp");
and echo the path I get c:\PHP\sessiondata mp.
If I use session_save_path("C:\PHP\sessiondata\tmp"); I get
c:\PHP\sessiondata\tmp.
Why do I not need to put "c:\PHP\sessionsdata"?
Anyway I tried using
"c:/PHP/sessiondata/tmp" and that does not work either.
Am a bit confused.
Any help would be greatly apprecaited.
TIA