Page 1 of 1

Help: sessions

Posted: Mon May 05, 2003 9:04 pm
by ruth
Hi Everyone,
I have a php database application. User's access information is stored in a session variable eg. $_SESSION["user"]. The session variables are set in an authenication class.

Every thing worked fine previously. However, we just upgraded PHP from Version 4.2.1 to 4.3.1 in order to include GD library. Now, all session varibales disappeared from the following pages. I have spent a whole day on this, and looked at php.net. But still can not find an anwser :cry: . No one can access to the application now. I am hoping some one in this forum can help me out please.

(By the way, I did a simple test to set a session without using the class, it works.)

Thank you very much in advance.

Ruth

Posted: Wed May 07, 2003 12:55 am
by ruth
I fixed the problem by adding "session_start()" at start of the function within the authentication class (previously, session_start() was called at start of the file). I can not explain why, but it works.

Ruth