You are here: Re: PHP Sessions « PHP Language « IT news, forums, messages
Re: PHP Sessions

Posted by Colin McKinnon on 06/16/05 16:51

Jure Erznoznik wrote:

> I have a rather specific problem with PHP sessions:
>
> When used together with Nevrona's Indy HTTP server, they seem to get lost
> and recreated all the time.
> Practically every page I try to access from my browser starts a new
> session.
>
> How does PHP control sessions and more importantly, how does it know that
> a new connection was established?
> Does it all depend on KeepAlive socket property? Then again, how does PHP
> know that it is a NEW socket that is established, not a previous one
> reused?

Nothing to do with keepAlive. PHP generates a 'handle' to some data stored
server-side (in a file by default) which is automagically loaded by PHP
when a PHP page is hit with a valid handle in the request.

Typically this is passed to the client as a cookie, and therefore requires
that PHP be able to set headers. Having never heard of "Nevrona's Indy" I
would take a guess that it's a header issue.

RTFM for more info on sessions - see also setcookie for testing.

C.

 

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

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