You are here: Re: [PHP] Re: why are session only working with cookies? « PHP « IT news, forums, messages
Re: [PHP] Re: why are session only working with cookies?

Posted by Jason Barnett on 05/16/05 17:02

Brian V Bonini wrote:
> On Fri, 2005-05-13 at 23:31, Jason Wong wrote:
>
>>On Saturday 14 May 2005 09:42, Brian V Bonini wrote:
>>
>>
>>>Yeah, I know session support is there and I DO NOT have it set to use
>>>ONLY cookies. But if I disable cookies in the browser stuff relying on
>>>sessions stops working. I'm using 5.0.3
>>
>>>session.use_trans_sid
>>>0
>>>0
>>
>>Set that to 1. Sessions *are* cookies, they're cookies that have been set
>>to expire when the browsing session finishes (ie when the browser is
>>closed).
>
>
> I thought the idea was; cookies if available otherwise the session data
> gets serialized and propagated in the URL? The later of which appears to
> not work, for me, if applicable....

While it is possible that you might save some data in a cookie (yes,
I've seen it done) that's not usually the way that it works. Usually
it's just as Richard has already described; the cookie just stores a
name / value pair that identifies which session is yours and then PHP
goes and retrieves that record.

If you don't want to rely on cookies then using trans_sid is seriously
the next best way to go. So go turn it on if you don't want to require
cookies, it really should be that simple! Then the name / value pair is
attached to the URLs instead of stored in a cookie.

<wonders>Do people actually try the code that I post to the list?</wonders>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация