Starts a session in the admin backend
509003
public function loginAction()
    {
        $form = new LoginForm();

        try {

            if (!$this->request->isPost()) {

                if ($this->auth->hasRememberMe()) {
                    return $this->auth->loginWithRememberMe();
                }
            } else {

                if ($form->isValid($this->request->getPost()) == false) {
                    foreach ($form->getMessages() as $message) {
                        $this->flash->error($message);
                    }
                } else {

                    $this->auth->check([
                        'email' => $this->request->getPost('email'),
                        'password' => $this->request->getPost('password'),
                        'remember' => $this->request->getPost('remember')
                    ]);

                    return $this->response->redirect('dashboard');
                }
            }
        } catch (AuthException $e) {
            $this->flash->error($e->getMessage());
        }

        $this->view->form = $form;
    }
1078900
def start(self, subid, params=None):
        ''' 
        '''
        params = update_params(params, {'SUBID': subid})
        return self.request('/v1/server/start', params, 'POST')
641554
public function start() {

		if(!$this->started) {

			// only non-CLI environments are supposed to provide sessions

			if(PHP_SAPI !== 'cli') {
				
				// avoid starting an already started session

				if (
					(PHP_VERSION_ID >= 50400 && session_status() === PHP_SESSION_ACTIVE) ||
					(PHP_VERSION_ID < 50400 && session_id())
				) {
					throw new \RuntimeException('Failed to start the session: Session already started.');
				}

				// allow session only when no headers have been sent

				if (headers_sent($file, $line)) {
					throw new \RuntimeException(sprintf("Cannot start session. Headers have already been sent by file '%s' at line %d.", $file, $line));
				}

				if(!session_start()) {
					throw new \RuntimeException('Session start failed.');
				}
			}

			$this->loadSession();

		}
	}
659304
public function start():void
    {
        if ((!$this->isStarted() && null === $this->session) || ($this->isStarted() && null === $this->session)) {
            $this->initSessionConfig();
            if (!$this->isStarted()) {
                session_start();
            }
            $this->session = $_SESSION;
        }
    }
201108
protected function _start()
	{
		// Start session if not started
		if ($this->getState() === 'restart')
		{
			session_regenerate_id(true);
		}
		else
		{
			$session_name = session_name();

			// Get the Joomla\Input\Cookie object
			$cookie = $this->input->cookie;

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

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

		/**
		 * 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;
	}
1264465
async def run(self):
        
        self._logger.info("Agent started")
        self.__backend_socket.connect(self.__backend_addr)

        # Tell the backend we are up and have `concurrency` threads available
        self._logger.info("Saying hello to the backend")
        await ZMQUtils.send(self.__backend_socket, AgentHello(self.__friendly_name, self.__concurrency, self.environments))
        self.__last_ping = time.time()

        run_listen = self._loop.create_task(self.__run_listen())

        self._loop.call_later(1, self._create_safe_task, self.__check_last_ping(run_listen))

        await run_listen
654283
public function sessionInit()
    {
        ini_set('session.auto_start', 0);
        $config = Container::get('config')->get('session');
        if ($config['adapter'] != '') {
            $class = '\\Kotori\\Http\\Session\\' . ucfirst($config['adapter']);
            if (!class_exists($class) || !session_set_save_handler(new $class($config))) {
                throw new NotFoundException('error session handler:' . $class);
            }
        }

        session_name('KOTORI_SESSID');
        if (isset($config['auto_start']) && $config['auto_start']) {
            session_start();
            $this->hasSessionStarted = true;
        }
    }
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__);
        }
    }
179793
def start_session(user, collection)
      connect
      session = Session.new user, collection
      self << session
      session
    end
499127
def _session_start(self):
        
        return self._session_class(self._session_id,
                                   self._session_duration,
                                   self._session_settings)
316076
protected function start()
    {
        set_time_limit(0);

        $this->session->delete('user');
        $this->session->delete('install');
        $this->session->set('install.data', $this->data);
    }
69408
public static function start()
    {
        /*
            session_id() will continue to return id even after session_write_close()
        */
        if (\session_status() === PHP_SESSION_ACTIVE) {
            return true;
        }
        if (\headers_sent()) {
            return false;
        }
        self::setCfg(array());  // makes sure all default's determined and set
        $success = \session_start();
        \bdk\Debug::_info('started', \session_id());
        if (self::$cfgStatic['regenOnStart']) {
            self::regenerateId();
        }
        return $success;
    }
933098
def start_dev_session(self):
        
        try:
            from .dev import DevServerSession
            session = DevServerSession.initialize(host=self.dev)
            session.start()

            #: Save a reference
            self._dev_session = session
        except:
            self.show_error(traceback.format_exc())
1162186
public function start()
	{
		if(!self::$isStarted){
			$this->session();
			$this->setDefaultTimezone();
			$this->registerErrorhandler();
			self::$isStarted = true;
		}
	}
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);
    }
872021
public static function run()
    {
        if (! session_id()) {
            session_start();
        }

        $complementType = self::getType('strtoupper');

        $path = App::$complementType();

        if ($paths = File::getFilesFromDir($path)) {
            foreach ($paths as $path) {
                if (! $path->isDot() && $path->isDir()) {
                    $_path = Url::addBackSlash($path->getPath());
                    $slug = $path->getBasename();
                    $file = $_path . $slug . '/' . $slug . '.json';
                    if (! File::exists($file)) {
                        continue;
                    }
                    self::load($file);
                }
            }
        }

        self::requestHandler(self::getType('strtolower', false));
    }
217025
private function start()
    {
        # Starting session.
        # Here making session active to every request.
        new Session();

        $this->setBaseURL();
        $this->setRequestURI();
        $this->fetchRouteRules();
        $this->establishConnection();
        $this->locateMethod();
        $this->invokeMethod();
    }