Jump to content

dealing with session


orange08

Recommended Posts

By default, the unique identifier that the server gives the browser is named PHPSESSID. This variable is stored on the client in either a URL, or a cookie. PHP first tries to set a cookie. If a browser does not accept cookies, PHP will append PHPSESSID to all URLs.

 

i read about this in a tutorial...

 

i would like to know if i disable my browser cookie, is that the session identifier will be automatically appended to my URL?

 

i did try it with my application, but seem it doesn't append session identifier to my URL, but my function just fail because session can't be created...

what's going on here?

Link to comment
https://forums.phpfreaks.com/topic/175213-dealing-with-session/#findComment-924572
Share on other sites

There is a setting in your php.ini (session.use_only_cookies) that prevents sessions being used when cookies are disabled. This is now the default since 5.3, maybe you have it set to 1.

 

yup, i know about that...but without those setting, then session identifier should be appended to my URL if disable the cookie, right? but, from my testing...seem NOT... :confused:

 

so, i don't know where's gone wrong and just worry if i didn't make it clear, latter the session identifier might be appended to URL without my knowledge... :(

 

you meant set session.use_only_cookies as ON, then session won't be created if cookie is disable?

Link to comment
https://forums.phpfreaks.com/topic/175213-dealing-with-session/#findComment-924587
Share on other sites

There is a setting in your php.ini (session.use_only_cookies) that prevents sessions being used when cookies are disabled. This is now the default since 5.3, maybe you have it set to 1.

 

yup, i know about that...but without those setting, then session identifier should be appended to my URL if disable the cookie, right? but, from my testing...seem NOT... :confused:

 

so, i don't know where's gone wrong and just worry if i didn't make it clear, latter the session identifier might be appended to URL without my knowledge... :(

 

you meant set session.use_only_cookies as ON, then session won't be created if cookie is disable?

 

help me, please! i have being stop here for about a week... :'(

Link to comment
https://forums.phpfreaks.com/topic/175213-dealing-with-session/#findComment-926389
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.