Reply to Re: help with session

Your name:

Reply:


Posted by Erwin Moller on 06/20/06 19:53

R. Rajesh Jeba Anbiah wrote:

> Erwin Moller wrote:
> <snip>
>> But since the OP is terminating the script test.php by calling exit(); it
>> won't help. I think.
>> I am missing something about session_write_close() maybe?
> <snip>
>
> session_write_close() will be implicitly called when you use
> exit(); but as header redirection is above exit() and some time the
> session values may not be written to the desk when that page redirect
> is accessed.

Hi Rajesh,

Aaah. Thanks, but I am still confused. :-/

Can i summarize it as follows?
When the exit() is reached, the session-writing and closing can be suspended
for some time (due to heavy load on the server eg.) and the next request
(originating from the header("Location: ...") is already trying to use that
same session.

But still I do not understand what can go wrong, since as I understand it
the second page is waiting for the first to finish before it can access the
session, so it hangs and waits.
So no problem there as far as I can see.

I would love to hear more opinions because I never use
session_write_close(), but never had any sessiontroubles either, not with
default sessionhandling (php/file) and custom (user/database).

So I would love to know if it is a serious improvement, or just a myth.

Can you/anybody shed some light on that?

TIA

Regards,
Erwin Moller

>
> --
> <?php echo 'Just another PHP saint'; ?>
> Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/

[Back to original 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

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