Reply to Unusual Session Behaviour

Your name:

Reply:


Posted by John Howie on 02/24/06 19:06

I've found very unusual behavious when using sessions on two different
servers.

I'm using sessions to handle simple log in. When the form submits the
values are checked against a MySQL table. If a match exists two session
variables are created: $_SESSION['db_is_logged_in'] and
$_SESSION['user']. Each page checks if the session variable
'db_is_logged_in' is set and is true, display the page otherwise use
header to redirect to an error page.

This worked all well and fine locally, and on one other server.
Recently I moved server and since then the whole authentication process
has been behaving unusually. Sometimes (when logged in) you are taken
to the error page, but your username is still displayed in the menu.
Clicking the link a few more times and eventually the page will display
correctly.

My question is are there any options or reasons why what has previously
worked fine could now be so unreliable? I am using session_start(), and
this worked very well on one server, why not another? The versions of
PHP are even the same (4.3.2).

This has had me stumped for a few days now and I'm no closer to solving
it, I'd really appreciate any suggestions. Thanks in advance.

[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

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