NYCPHP Meetup

NYPHP.org

[nycphp-talk] $_SESSION in Static function

Vamsidhar Bethanabatla b.vamsidhar at hotmail.com
Thu May 11 04:54:30 EDT 2006


I found a very tricky problem with a wrapper class that I had coded for 
setting and getting variables in $_SESSION super global array. The class is 
an utility class having function
HttpRequest::GetSessionParm() and  HttpRequest::SetSessionParm() to get and 
set values in $_SESSION resply. I was under the impression that $_SESSION 
need not be defined as 'global' within class methods but this wrapper class 
initially failed when the system was deployed on FreeBSD machine. It worked 
when I added 'global $_SESSION' within the above mentioned static methods. I 
am not aware of the reason. It worked fine on my machine (windows 2000 
professional). Any reason available for the problem will be appreciated.

Thanx,
Vamsi

_________________________________________________________________
Sexy, sultry, sensuous. - see why Bipasha Basu is all that and more. Try MSN 
Search http://server1.msn.co.in/Profile/bipashabasu.asp




More information about the talk mailing list