|
|
Posted by white lightning on 01/31/08 05:52
On Jan 31, 12:36 am, Jerry Stuckle <jstuck...@attglobal.net> wrote:
>
> >> OK, what do you have in $_SESSION when it fails?
>
> >> echo "<pre>\n";
> >> print_r($_SESSION);
> >> echo "</pre>\n";
>
> > when it fails, i get an empty array: Array(). Obviously, it has logged
> > out and has removed all the session values.
>
> Not so obvious to me. All it shows is that you have an empty session
> array. There could be plenty of reasons - bad session id, for instance.
> Or the server not storing the session information properly, or any of
> about 100 other reasons.
>
in my localhost, this is what i get once i log in:
Array
(
[uid] => 1
[username] => xxx
[cookie] =>
[logged] => 1
)
and once i log out, i get Array( ).
In the failing server, I can log in once and after I click on the
other page, I get Array ( ).
> So, in yourlogincode, set another variable in the session which you
> don't clear. is the $_SESSION array still empty?
>
I tried the above and didn't clear the array... yes the $_SESSION
array is still empty on subsequent pages. perhaps it's something to do
with the way my hosting server is handling the sessions... or could it
be due to different versions of PHP?
Navigation:
[Reply to this message]
|