A few hours ago, I created a thread here regarding a session that no longer exists when going to www. This should fix this:
session_set_cookie_params(0, '/', '.'.$_SERVER['HTTP_HOST']);
According to a few examples on php.net and other sites this should be correct. When you go to the site without using www. and then switch to www., the session is still working (I am still recording it), but for some very strange reason it is not possible to create a session (to log in) on the website when using www. Now.
So, I can log in when I do not use www., I can switch to www. so the session still exists, but I cannot log in when using www.
Can someone explain this behavior and how can I fix it? Also, is this secure server used?
Thank!
Bv202 source
share