Sessions will break if the user visits a sub-path of your site root and then navigates upwards. This is because the cookie will only be set for that path, not your entire domain. More info here: http://www.php.net/manual/en/function.session-start.php#91298
A:
no
2010-10-01 07:41:41
I redirect from https : //domain.com/login to https : //domain.com/profile , both links are rewritten to https : //domain.com/index.php by mod_rewrite.
ubes
2010-10-01 07:51:05
It sounds like this isn't your problem then. Still, it doesn't hurt to double-check the stored cookie paths make sure they are all set to root.
no
2010-10-01 08:00:21
Checked. Both set to root. Remember I have the same PHP code running smoothly on another apache so I'm not expecting this to be a problem with my code. Prolly a windows, apache or php settings issue.
ubes
2010-10-01 08:18:13
Probably so... you could try comparing the output from `print_r($_SERVER)` and `phpinfo()` and see if there are any obvious differences between the two servers...
no
2010-10-01 09:37:03
Both are identical
ubes
2010-10-01 10:57:46
Just shooting in the dark at this point but does the server run at the console work if you run it by itself without the NT service running? Maybe the configurations are *too* identical, like they are using the same httpd.conf or port or something? Alternatively, why not try installing both servers as NT services?
no
2010-10-01 12:03:11
A:
Look at the permissions of the php session directory where the files for the session are being stored. If php doesn't have the rights to write, create and change files you won't be able to store anything in your $_SESSION var.
ITroubs
2010-10-01 12:07:17
A:
I found the solution. The user that runs the webserver did have permission to all paths in the httpd.conf but did not have permission to access all paths in PHP.ini. session.save_path is one of those paths and the server can't access session data if it can't store session data.
The session.save_path was set to C:\Windows\Temp and initially I did not think I had to give permissions to anything but the apache dirs, php dirs and webroot.
Thanks for all your help!
ubes
2010-10-01 12:11:25