You are here: Re: Session generation problem « PHP Programming Language « IT news, forums, messages
Re: Session generation problem

Posted by Erwin Moller on 08/24/05 11:08

varungupta wrote:

> Hi Group members !
>
> We are hosting a Apache/PHP/MySql based website at our college since
> January,2005. It was working fine since then. The web server is plaed
> in our college itself and we are using IP binding method to make it
> available globally.
>
> We are having a login page which redirects the user again to home page
> after authentication but with a session started. But the problem was
> that every time the user enters his username and password, he was
> redirected to home page but no session was genrated i.e. he is logged
> in.
>
> We tried to work out a solution for the problem but coudn't find one.
> But to our surprise, the site started working normally on its own after
> about 3 hours.
>
> But yesterday, the same problem again surfaced and again we had no
> solution. Thinking of past instance, we waited for many hours but the
> problem sustained.
> And still our site is affected with that problem.
>
> The tecnical information :
> Web server : Apache 2.0.52 Build Oct 15, 2004
> PHP interpreter : PHP 4.3.9 Build Oct 20, 2004
> Operating System : Linux Fedora Core 3
>
> Can anyone suggest any solution or reference for the problem ?


Hi,

That is a really weird problem.
Next time you are unable to start session, do some testing.

Here are some things of importance to get a general idea.
I take it you store session in a temp-dir serialized (which is default
behaviour). If you use a database to store session, do something similar as
I decribed here to hunt down the bug.

0) Download Firefox as browser if don't have that already.
1) Thow away all your cookies.
2) Log into the system via the website as you always do.
3) check if a cookie is placed. It will have a name like: PHPSESSID and it
will contain a whole lot of random characters.
Note that string.
4) Look on the machine where PHP is running and check the temp-dir.
(You can find the temp-dir in php.ini, or when it is not set there: it is
the default tempdir, like /tmp)
5) Do you see a file in there with the same number-characterstring as the
cookie contained?

What do you find?

Regards,
Erwin Moller

 

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

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