You are here: Re: login problem « All PHP « IT news, forums, messages
Re: login problem

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]


Удаленная работа для программистов  •  Как заработать на 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

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