protected function isActive()
    {
        $setting = 'session.use_trans_sid';
        $current = ini_get($setting);
        if (false === $current) {
            throw new \UnexpectedValueException(sprintf('Setting %s does not exists.', $setting));
        }
        $result = @ini_set($setting, $current);
        return $result !== $current;
    }
protected function isActive()
    {
        $setting = 'session.use_trans_sid';
        $current = ini_get($setting);
        if (false === $current) {
            throw new \UnexpectedValueException(sprintf('Setting %s does not exists.', $setting));
        }
        $result = @ini_set($setting, $current);
        return $result !== $current;
    }
protected function isActive ( ) { $ setting = 'session.use_trans_sid' ; $ current = ini_get ( $ setting ) ; if ( false === $ current ) { throw new \ UnexpectedValueException ( sprintf ( 'Setting %s does not exists.' , $ setting ) ) ; } $ result = @ ini_set ( $ setting , $ current ) ; return $ result !== $ current ; }
Check if session is started

For 5.4+, use session_status instead

@return bool
@link http://stackoverflow.com/questions/3788369/how-to-tell-if-a-session-is-active/7656468#7656468
Check if session is started