You are here: Re: Deleting session with connection open « PHP Programming Language « IT news, forums, messages
Re: Deleting session with connection open

Posted by Rik Wasmus on 01/01/08 14:11

On Tue, 01 Jan 2008 12:05:34 +0100, Derek Fountain
<nomail@hursley.ibm.com> wrote:

> I've got a function that builds a webpage containing a flash animation.
> As the page goes to the browser, the browser sees the link to the
> embedded FLV file and opens a new connection to retrieve it. A moment
> later the page download is completed, and a few seconds after that,
> depending on the user's connection speed, the FLV download completes and
> the use has the content. All fine.
>
> The issue comes if the user receives the page, but then hits the
> 'logout' link on it before the FLV has completely downloaded. The
> browser goes to fetch the logout page (which deletes the session, etc.)
> but it seems that since there's still a connection open for the FLV
> stream something odd happens. It appears the session doesn't get
> deleted. If, having received the logout page, the user hits their back
> button, they go back to the previous page and it all still works - they
> haven't been logged out.
>
> This doesn't happen every time, so I'm guessing it's a race condition.
> Can anyone explain what's happening and what I can do about it?


1. If the FLV file is served/created/altered with PHP, get all session
variables you need straight at the beginning, and call
session_write_close() immediatelly after it before doing any other work.
2. If it's not served with PHP, there is another problem, an we'd like to
see your logout code.
--
Rik Wasmus

 

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

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