I'm using php $_SESSION such as this


however i keep getting this error

Notice: Undefined variable: _SESSION in /var/www/m/inc/referrer.php on line 3

and so i added this to the peak of my script

ini_set('session.use_cookies', 'On');
ini_set('session.use_trans_sid', 'Off');
session_set_cookie_params(0, '/');

and all sorts of is nice.

It is possible to method to switch on periods permanently because needing to add this on the top associated with a script that requires a session is type of redundant....i visited php.ini but you will find many calls that begin with session...any applying for grants what i have to change ...I'm on ubuntu 10.10/php5 just in case that means something



However i wouldn't recommend utilizing it. For instance you want to store whole object in session, to get it done you should include file with class declaration first, otherwise unserialized object is going to be of incomplete class.

Other would be to auto-prepend file that sets some fundamental configuration and begins session



session.auto_start boolean session.auto_start identifies if the session module begins a session instantly on request startup. Defaults to (disabled).