Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Session Variables Expire

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I need to use session variables in a WAP application. I use the session variables according to the PHP documentation. However, there is something really strange about it.

I initialize the session variable as described. It is avaiable in the next couple of form I navigate to (those forms are in separate files). But when I navigate farther to a third file, the session variable is unitialized.

What can I do about it?
 
My guess is your session var expire time is set to a low time in your php.ini or possibly the var you registered as a session var is reused in the form that it appears to "disappear".

Eric
 
I have the same problem. I checked the php.ini file. The session.expire_time is set to 180 minutes.
But the script looses the authentication session variable some times in few minutes.
That session variable is not re-used in the script any where else.

Please help
 
For some strange (and stupid, no doubt) reason, session variables in PHP have to be declared as global each and every time they appear inside a function or statement block. I don't think anybody could ever figure out this amazingly stupid slight from the PHP guys.
So, my friends, never forget to globalize session variables. This issue got me sleepless for days.

Luck, Pepinho.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top