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
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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.