throw new \RuntimeException('Failed to start the session: already started by PHP.'); } if (ini_get('session.use_cookies') && headers_sent($file, $line)) { throw new \RuntimeException( sprintf('Failed to start the session because headers have already been sent by "%s" at line %d.', $file, $line) ); } if (!session_start()) $this->setId($session_clean); $cookie->set($session_name, '', time() - 3600); } } parent::start(); // Try loading data from the session if (isset($_SESSION['joomla']) && !empty($_SESSION['joomla'])) { $this->data = unserialize(base64_decode($_SESSION['joomla'])); } if ($this->isStarted()) { return; } $this->store->start(); $this->setState(SessionState::ACTIVE); // Initialise the session $this->setCounter(); */ public function has($name) { if (!$this->isActive()) { $this->start(); } return $this->store->has($name); } $name = $args[2] . '.' . $name; } } if (parent::has($name)) { // Parent is used because of b/c, can be changed in Joomla 5 return parent::get($name, $default); } /* ->alias(\Joomla\CMS\Session\Session::class, 'session.web.site') ->alias(\Joomla\Session\Session::class, 'session.web.site') ->alias(\Joomla\Session\SessionInterface::class, 'session.web.site');$app = $container->get(\Joomla\CMS\Application\SiteApplication::class);$user = $app->getSession()->get('user');writelog ('999_DEBUG.txt' , '<utilty.php> ' . 'user=' . print_r($user, TRUE), 2) ;//writelog ('999_DEBUG.txt' , '<utilty.php> ' . 'user id=' . $user->id . ' email=' . $user->email . ' username=' . $user->username, 1) ;function db_query($caller, $query, $type){<?phprequire_once 'utility.php';require_once '../controller.php';// BEGIN MAINwritelog ('999_ACTIONS.txt' , '<router.php> ENTERING $_POST='. print_r($_POST, TRUE), 1) ;writelog ('999_ACTIONS.txt' , '<router.php> ENTERING $_GET='. print_r($_GET, TRUE), 1) ;|
RuntimeException
|
|---|
RuntimeException:
Failed to start the session because headers have already been sent by "/home/ldhub/public_html/leasedeposit/files/utility.php" at line 59.
at /home/ldhub/public_html/libraries/vendor/joomla/session/src/Storage/NativeStorage.php:473
at Joomla\Session\Storage\NativeStorage->start()
(/home/ldhub/public_html/libraries/src/Session/Storage/JoomlaStorage.php:295)
at Joomla\CMS\Session\Storage\JoomlaStorage->start()
(/home/ldhub/public_html/libraries/vendor/joomla/session/src/Session.php:406)
at Joomla\Session\Session->start()
(/home/ldhub/public_html/libraries/vendor/joomla/session/src/Session.php:333)
at Joomla\Session\Session->has('user')
(/home/ldhub/public_html/libraries/src/Session/Session.php:194)
at Joomla\CMS\Session\Session->get('user')
(/home/ldhub/public_html/leasedeposit/files/utility.php:80)
at require_once('/home/ldhub/public_html/leasedeposit/files/utility.php')
(/home/ldhub/public_html/leasedeposit/files/router.php:2)
|