Page 1 of 1

Session Control [on/off]

Posted: Wed Sep 06, 2006 2:49 pm
by infolock
Is there a method to determine if sticky session control has been turned on or off? This is the first time i've run into this issue, and am wondering if there is a quick check I can make to determine if it's turned on or off.

Currently, I'm doing something like this:

Code: Select all

session_start();
if(isset($_SESSION)) {
  $this->session =& $_SESSION;
} else {
  $this->session = array();
}
but i'm unsure if this is the best method or not.

if anyone could shed some light on this that would be great. thanks.


[edit]

Let me rephrase that. I am wanting to determine if session-support has been enabled in the php config file or not on the fly.

Posted: Wed Sep 06, 2006 3:01 pm
by s.dot
That seems good.. maybe ini_get()? Not sure what you would "get" from the ini file though. =/

Posted: Wed Sep 06, 2006 3:03 pm
by infolock
Yeah, I could do that, only I don't want to as I'm already using ini_set to point to my own personal ini file for some path settings. Would be my last alternative. Just wondering if there was an alternative, or if what I wrote above is the alternative.

Posted: Wed Sep 06, 2006 3:23 pm
by feyd
get_loaded_extensions() might give you a hint.

Posted: Wed Sep 06, 2006 4:34 pm
by infolock
Thanks

Posted: Wed Sep 06, 2006 4:40 pm
by s.dot
Everah in the Ode To Feyd Topic wrote:30. Hundreds of PHP built-in functions, not known to you or I, are anxiously waiting for Feyd to tell someone: "You might want to look at...".
:lol: