To start session
503802
protected function startSession()
    {
        if (session_status() == PHP_SESSION_NONE) {

            session_start();

            if(!$this->expireOnClose) {
                setcookie('planet_session', session_id(), time() + ($this->expireTime * 60 ), '/', null, false, false);
            }
        }
    }
1019524
protected function _start()
	{
		// Start session if not started
		if ($this->state === 'restart')
		{
			session_regenerate_id(true);
		}
		else
		{
			$session_name = session_name();

			// Get the JInputCookie object
			$cookie = $this->input->cookie;

			if (is_null($cookie->get($session_name)))
			{
				$session_clean = $this->input->get($session_name, false, 'string');

				if ($session_clean)
				{
					session_id($session_clean);
					$cookie->set($session_name, '', time() - 3600);
				}
			}
		}

		/**
		 * Write and Close handlers are called after destructing objects since PHP 5.0.5.
		 * Thus destructors can use sessions but session handler can't use objects.
		 * So we are moving session closure before destructing objects.
		 *
		 * Replace with session_register_shutdown() when dropping compatibility with PHP 5.3
		 */
		register_shutdown_function('session_write_close');

		session_cache_limiter('none');
		session_start();

		return true;
	}
1178448
public function start()
    {
        if (!$this->isStarted()) {
            if ($this->cookie
                && !empty($_COOKIE[session_name()])
            ) {
                session_id($_COOKIE[session_name()]);
            }

            session_start();
        }

        return $this;
    }
1038111
public void startupSessionTimeoutCommand() {
        if (initSessionTimeoutCommand.compareAndSet(false, true)) {
            final Long sessionTimeout = getSessionTimeout();
            if ( sessionTimeout != null && sessionTimeout > 0) {
                if ( scheduledEventslogger.isTraceEnabled() ) {
                    scheduledEventslogger.trace( "Establishing a session timeout of " + sessionTimeout + " seconds for WebSocket session (" + getId() + ").");
                }
                scheduleCommand(this.sessionTimeout, sessionTimeout);
            }
        }
    }
1342557
protected function startBrokerSession()
    {
        if (isset($this->brokerId)) {
            return;
        }

        $sessionId = $this->getBrokerSessionId();

        if (!$sessionId) {
            $this->fail('Missing session key from broker.');
        }

        $savedSessionId = $this->getBrokerSessionData($sessionId);

        if (!$savedSessionId) {
            $this->fail('There is no saved session data associated with the broker session id.');
        }

        $this->startSession($savedSessionId);

        $this->brokerId = $this->validateBrokerSessionId($sessionId);
    }
86012
def start(self, request: Request) -> Response:
        '''
        '''
        if self._session_state != SessionState.ready:
            raise RuntimeError('Session already started')

        assert not self._request
        self._request = request
        _logger.debug(__('Client fetch request {0}.', request))

        connection = yield from self._acquire_request_connection(request)
        full_url = connection.proxied and not connection.tunneled

        self._stream = stream = self._stream_factory(connection)

        yield from self._stream.reconnect()

        request.address = connection.address

        self.event_dispatcher.notify(self.Event.begin_request, request)
        write_callback = functools.partial(self.event_dispatcher.notify, self.Event.request_data)
        stream.data_event_dispatcher.add_write_listener(write_callback)

        yield from stream.write_request(request, full_url=full_url)

        if request.body:
            assert 'Content-Length' in request.fields
            length = int(request.fields['Content-Length'])
            yield from stream.write_body(request.body, length=length)

        stream.data_event_dispatcher.remove_write_listener(write_callback)
        self.event_dispatcher.notify(self.Event.end_request, request)

        read_callback = functools.partial(self.event_dispatcher.notify, self.Event.response_data)
        stream.data_event_dispatcher.add_read_listener(read_callback)

        self._response = response = yield from stream.read_response()
        response.request = request

        self.event_dispatcher.notify(self.Event.begin_response, response)

        self._session_state = SessionState.request_sent

        return response
1218427
public function start()
    {
        if (!session_id() || !$this->isActive()) {
            $file = $line = null;
            if (headers_sent($file, $line)) {
                throw new \RuntimeException(sprintf('Unable to start session, output started at %s:%s', $file, $line));
            }
            session_start();
        }

        if ($this->namespace) {
            if (!isset($_SESSION[$this->namespace])) {
                $_SESSION[$this->namespace] = array();
            }
            $this->data = &$_SESSION[$this->namespace];
        } else {
            $this->data = &$_SESSION;
        }
    }
431859
private void startSession() {
        AssumeRoleWithWebIdentityResult sessionTokenResult = securityTokenService
                .assumeRoleWithWebIdentity(new AssumeRoleWithWebIdentityRequest().withWebIdentityToken(wifToken)
                        .withProviderId(wifProvider)
                        .withRoleArn(roleArn)
                        .withRoleSessionName("ProviderSession")
                        .withDurationSeconds(this.sessionDuration));
        Credentials stsCredentials = sessionTokenResult.getCredentials();

        subjectFromWIF = sessionTokenResult.getSubjectFromWebIdentityToken();

        sessionCredentials = new BasicSessionCredentials(
                stsCredentials.getAccessKeyId(),
                stsCredentials.getSecretAccessKey(),
                stsCredentials.getSessionToken());
        sessionCredentialsExpiration = stsCredentials.getExpiration();
    }
1070112
public function startSession()
    {
        return (string) $this->sendTransaction([
          'email' => $this->email,
          'token' => $this->token,
        ], $this->url['session'])->id;
    }
580320
protected function startSession()
    {
        $this->hook->trigger(self::HOOK_SESSION_START_BEFORE);

        $session = \Parable\DI\Container::get(\Parable\GetSet\Session::class);
        $session->start();

        $this->hook->trigger(self::HOOK_SESSION_START_AFTER, $session);
        return $this;
    }
245292
public function start()
    {
        if ($this->started === false) {
            $this->sessionIdentifier = Algorithms::generateRandomString(32);
            $this->storageIdentifier = Algorithms::generateUUID();
            $this->sessionCookie = new Cookie($this->sessionCookieName, $this->sessionIdentifier, 0, $this->sessionCookieLifetime, $this->sessionCookieDomain, $this->sessionCookiePath, $this->sessionCookieSecure, $this->sessionCookieHttpOnly);
            $this->lastActivityTimestamp = $this->now;
            $this->started = true;

            $this->writeSessionMetaDataCacheEntry();
        }
    }
311585
protected function initiate()
    {
        $name = $this->name;
        $data = ['acl' => [], 'actions' => [], 'roles' => []];
        $data = array_merge($data, $this->memory->get("acl_{$name}", []));
        if (empty($data['roles'])) {
            $roles         = $this->memory->get('acl_antares.roles');
            $data['roles'] = $roles == null ? [] : $roles;
        }

        $this->roles->attachKeyValuePair($data['roles']);
        $this->actions->attachKeyValuePair($data['actions']);

        foreach ($data['acl'] as $id => $allow) {
            list($role, $action) = explode(':', $id);
            $this->assign($role, $action, $allow);
        }
    }
837880
protected function start()
	{
		// Start session if not started
		if ($this->state == 'restart')
		{
			session_id($this->createId());
		}
		else
		{
			$session_name = session_name();

			if (!\Request::getVar($session_name, false, 'COOKIE'))
			{
				if ($id = \Request::getVar($session_name))
				{
					session_id($id);
					setcookie($session_name, '', time() - 3600);
				}
				else
				{
					session_id($this->createId());
				}
			}
		}

		session_cache_limiter('none');
		session_start();

		// Regenerate session id if passed a session id that no longer exists
		if ($_SESSION === array())
		{
			session_destroy();
			session_id($this->createId());
			session_start();
		}

		return true;
	}
316076
protected function start()
    {
        set_time_limit(0);

        $this->session->delete('user');
        $this->session->delete('install');
        $this->session->set('install.data', $this->data);
    }
1146837
public function open()
    {
        if ($this->getIsActive()) {
            return;
        }

        $this->registerSessionHandler();

        $this->setCookieParamsInternal();

        YII_DEBUG ? session_start() : @session_start();

        if ($this->getIsActive()) {
            Yii::info('Session started', __METHOD__);
            $this->updateFlashCounters();
        } else {
            $error = error_get_last();
            $message = $error['message'] ?? 'Failed to start session.';
            Yii::error($message, __METHOD__);
        }
    }
418142
def start(self) -> None:
        """"""

        session = self.client.create_session(
            self.kind,
            self.proxy_user,
            self.jars,
            self.py_files,
            self.files,
            self.driver_memory,
            self.driver_cores,
            self.executor_memory,
            self.executor_cores,
            self.num_executors,
            self.archives,
            self.queue,
            self.name,
            self.spark_conf,
        )
        self.session_id = session.session_id

        not_ready = {SessionState.NOT_STARTED, SessionState.STARTING}
        intervals = polling_intervals([0.1, 0.2, 0.3, 0.5], 1.0)

        while self.state in not_ready:
            time.sleep(next(intervals))
581719
public function afterSessionStart()
	{
		$session = JFactory::getSession();

		if ($session->isNew())
		{
			$session->set('registry', new Registry('session'));
			$session->set('user', new JUser);
		}
	}