I'm having an issue with my sessions running on localhost. each page is being given its own session id.
here is the code for starting the session
session_set_cookie_params(0, '', '', false); session_start();
any help would be appreciated.
I don't understand what your problem is?
You need to have :
session.use_cookies = 1 and session.auto_start = On
in your Php ini file.
kamy99 wrote:You need to have : session.use_cookies = 1 and session.auto_start = On
Quite incorrect - you definitely do not need (nor, most likely, even want) the second line.
garblar: Is there a reason you're using the [man]session_set_cookie_params/man function at all? Normally, you just start the session and leave the default cookie settings alone.
well, basically i was just messing around trying to fix it because my sessions were not working. but in the end i just restarted apache and everything started working. only wasted 2 hours 😃