/is/htdocs/wp10977587_Z2OWAV7N6E/www/aktiv-fuer-aktive/system/src/Grav/Framework/Session/Session.php
$sessionExists = isset($_COOKIE[$sessionName]);
// Protection against invalid session cookie names throwing exception: http://php.net/manual/en/function.session-id.php#116836
if ($sessionExists && !preg_match('/^[-,a-zA-Z0-9]{1,128}$/', $_COOKIE[$sessionName])) {
unset($_COOKIE[$sessionName]);
$sessionExists = false;
}
$options = $this->options;
if ($readonly) {
$options['read_and_close'] = '1';
}
$success = @session_start($options);
$user = $success ? $this->__get('user') : null;
if (!$success) {
$last = error_get_last();
$error = $last ? $last['message'] : 'Unknown error';
throw new SessionException('Failed to start session: ' . $error, 500);
}
$this->started = true;
if ($user && (!$user instanceof UserInterface || !$user->isValid())) {
$this->invalidate();
throw new SessionException('Invalid User object, session destroyed.', 500);
}
// Extend the lifetime of the session.
if ($sessionExists) {
$params = session_get_cookie_params();
setcookie(
$sessionName,
session_id(),
time() + $params['lifetime'],
$params['path'],
$params['domain'],
Arguments
"Failed to start session: session_start(): Session cannot be started after headers have already been sent"
/is/htdocs/wp10977587_Z2OWAV7N6E/www/aktiv-fuer-aktive/system/src/Grav/Common/Session.php
/**
* @return \Grav\Framework\Session\Session
* @deprecated 1.5 Use ->getInstance() method instead.
*/
public static function instance()
{
user_error(__CLASS__ . '::' . __FUNCTION__ . '() is deprecated since Grav 1.5, use ->getInstance() method instead', E_USER_DEPRECATED);
return static::getInstance();
}
/**
* Initialize session.
*
* Code in this function has been moved into SessionServiceProvider class.
*/
public function init()
{
if ($this->autoStart && !$this->isStarted()) {
$this->start();
$this->autoStart = false;
}
}
/**
* @param bool $auto
* @return $this
*/
public function setAutoStart($auto)
{
$this->autoStart = (bool)$auto;
return $this;
}
/**
* Returns attributes.
*
* @return array Attributes
/is/htdocs/wp10977587_Z2OWAV7N6E/www/aktiv-fuer-aktive/system/src/Grav/Common/Processors/InitializeProcessor.php
if ($config->get('system.cache.gzip') && !@ob_start('ob_gzhandler')) {
// Enable zip/deflate with a fallback in case of if browser does not support compressing.
ob_start();
}
// Initialize the timezone.
$timezone = $config->get('system.timezone');
if ($timezone) {
date_default_timezone_set($timezone);
}
// FIXME: Initialize session should happen later after plugins have been loaded. This is a workaround to fix session issues in AWS.
if (isset($this->container['session']) && $config->get('system.session.initialize', true)) {
// TODO: remove in 2.0.
$this->container['accounts'];
try {
$this->container['session']->init();
} catch (SessionException $e) {
$this->container['session']->init();
$message = 'Session corruption detected, restarting session...';
$this->addMessage($message);
$this->container['messages']->add($message, 'error');
}
}
/** @var Uri $uri */
$uri = $this->container['uri'];
$uri->init();
// Redirect pages with trailing slash if configured to do so.
$path = $uri->path() ?: '/';
if ($path !== '/'
&& $config->get('system.pages.redirect_trailing_slash', false)
&& Utils::endsWith($path, '/')) {
$redirect = (string) $uri::getCurrentRoute()->toString();
$this->container->redirect($redirect);
}
/is/htdocs/wp10977587_Z2OWAV7N6E/www/aktiv-fuer-aktive/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
private $handler;
/** @var ContainerInterface|null */
private $container;
/**
* {@inheritdoc}
* @throws InvalidArgumentException
*/
public function handle(ServerRequestInterface $request): ResponseInterface
{
$middleware = array_shift($this->middleware);
// Use default callable if there is no middleware.
if ($middleware === null) {
return \call_user_func($this->handler, $request);
}
if ($middleware instanceof MiddlewareInterface) {
return $middleware->process($request, clone $this);
}
if (null === $this->container || !$this->container->has($middleware)) {
throw new InvalidArgumentException(
sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
$middleware
);
}
array_unshift($this->middleware, $this->container->get($middleware));
return $this->handle($request);
}
}
Arguments
ServerRequest {#69}
RequestHandler {#122}
/is/htdocs/wp10977587_Z2OWAV7N6E/www/aktiv-fuer-aktive/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
// Use default callable if there is no middleware.
if ($middleware === null) {
return \call_user_func($this->handler, $request);
}
if ($middleware instanceof MiddlewareInterface) {
return $middleware->process($request, clone $this);
}
if (null === $this->container || !$this->container->has($middleware)) {
throw new InvalidArgumentException(
sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
$middleware
);
}
array_unshift($this->middleware, $this->container->get($middleware));
return $this->handle($request);
}
}
Arguments
/is/htdocs/wp10977587_Z2OWAV7N6E/www/aktiv-fuer-aktive/system/src/Grav/Common/Processors/DebuggerProcessor.php
*/
namespace Grav\Common\Processors;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Server\RequestHandlerInterface;
class DebuggerProcessor extends ProcessorBase
{
public $id = '_debugger';
public $title = 'Init Debugger';
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler) : ResponseInterface
{
$this->startTimer();
$this->container['debugger']->init();
$this->stopTimer();
return $handler->handle($request);
}
}
Arguments
/is/htdocs/wp10977587_Z2OWAV7N6E/www/aktiv-fuer-aktive/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
private $handler;
/** @var ContainerInterface|null */
private $container;
/**
* {@inheritdoc}
* @throws InvalidArgumentException
*/
public function handle(ServerRequestInterface $request): ResponseInterface
{
$middleware = array_shift($this->middleware);
// Use default callable if there is no middleware.
if ($middleware === null) {
return \call_user_func($this->handler, $request);
}
if ($middleware instanceof MiddlewareInterface) {
return $middleware->process($request, clone $this);
}
if (null === $this->container || !$this->container->has($middleware)) {
throw new InvalidArgumentException(
sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
$middleware
);
}
array_unshift($this->middleware, $this->container->get($middleware));
return $this->handle($request);
}
}
Arguments
ServerRequest {#69}
RequestHandler {#120}
/is/htdocs/wp10977587_Z2OWAV7N6E/www/aktiv-fuer-aktive/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
// Use default callable if there is no middleware.
if ($middleware === null) {
return \call_user_func($this->handler, $request);
}
if ($middleware instanceof MiddlewareInterface) {
return $middleware->process($request, clone $this);
}
if (null === $this->container || !$this->container->has($middleware)) {
throw new InvalidArgumentException(
sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
$middleware
);
}
array_unshift($this->middleware, $this->container->get($middleware));
return $this->handle($request);
}
}
Arguments
/is/htdocs/wp10977587_Z2OWAV7N6E/www/aktiv-fuer-aktive/system/src/Grav/Common/Processors/ErrorsProcessor.php
*/
namespace Grav\Common\Processors;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Server\RequestHandlerInterface;
class ErrorsProcessor extends ProcessorBase
{
public $id = '_errors';
public $title = 'Error Handlers Reset';
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler) : ResponseInterface
{
$this->startTimer();
$this->container['errors']->resetHandlers();
$this->stopTimer();
return $handler->handle($request);
}
}
Arguments
/is/htdocs/wp10977587_Z2OWAV7N6E/www/aktiv-fuer-aktive/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
private $handler;
/** @var ContainerInterface|null */
private $container;
/**
* {@inheritdoc}
* @throws InvalidArgumentException
*/
public function handle(ServerRequestInterface $request): ResponseInterface
{
$middleware = array_shift($this->middleware);
// Use default callable if there is no middleware.
if ($middleware === null) {
return \call_user_func($this->handler, $request);
}
if ($middleware instanceof MiddlewareInterface) {
return $middleware->process($request, clone $this);
}
if (null === $this->container || !$this->container->has($middleware)) {
throw new InvalidArgumentException(
sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
$middleware
);
}
array_unshift($this->middleware, $this->container->get($middleware));
return $this->handle($request);
}
}
Arguments
ServerRequest {#69}
RequestHandler {#108}
/is/htdocs/wp10977587_Z2OWAV7N6E/www/aktiv-fuer-aktive/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
// Use default callable if there is no middleware.
if ($middleware === null) {
return \call_user_func($this->handler, $request);
}
if ($middleware instanceof MiddlewareInterface) {
return $middleware->process($request, clone $this);
}
if (null === $this->container || !$this->container->has($middleware)) {
throw new InvalidArgumentException(
sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
$middleware
);
}
array_unshift($this->middleware, $this->container->get($middleware));
return $this->handle($request);
}
}
Arguments
/is/htdocs/wp10977587_Z2OWAV7N6E/www/aktiv-fuer-aktive/system/src/Grav/Common/Processors/LoggerProcessor.php
/** @var Config $config */
$config = $grav['config'];
switch ($config->get('system.log.handler', 'file')) {
case 'syslog':
$log = $grav['log'];
$log->popHandler();
$facility = $config->get('system.log.syslog.facility', 'local6');
$logHandler = new SyslogHandler('grav', $facility);
$formatter = new LineFormatter("%channel%.%level_name%: %message% %extra%");
$logHandler->setFormatter($formatter);
$log->pushHandler($logHandler);
break;
}
$this->stopTimer();
return $handler->handle($request);
}
}
Arguments
/is/htdocs/wp10977587_Z2OWAV7N6E/www/aktiv-fuer-aktive/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
private $handler;
/** @var ContainerInterface|null */
private $container;
/**
* {@inheritdoc}
* @throws InvalidArgumentException
*/
public function handle(ServerRequestInterface $request): ResponseInterface
{
$middleware = array_shift($this->middleware);
// Use default callable if there is no middleware.
if ($middleware === null) {
return \call_user_func($this->handler, $request);
}
if ($middleware instanceof MiddlewareInterface) {
return $middleware->process($request, clone $this);
}
if (null === $this->container || !$this->container->has($middleware)) {
throw new InvalidArgumentException(
sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
$middleware
);
}
array_unshift($this->middleware, $this->container->get($middleware));
return $this->handle($request);
}
}
Arguments
ServerRequest {#69}
RequestHandler {#100}
/is/htdocs/wp10977587_Z2OWAV7N6E/www/aktiv-fuer-aktive/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
// Use default callable if there is no middleware.
if ($middleware === null) {
return \call_user_func($this->handler, $request);
}
if ($middleware instanceof MiddlewareInterface) {
return $middleware->process($request, clone $this);
}
if (null === $this->container || !$this->container->has($middleware)) {
throw new InvalidArgumentException(
sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
$middleware
);
}
array_unshift($this->middleware, $this->container->get($middleware));
return $this->handle($request);
}
}
Arguments
/is/htdocs/wp10977587_Z2OWAV7N6E/www/aktiv-fuer-aktive/system/src/Grav/Common/Processors/ConfigurationProcessor.php
namespace Grav\Common\Processors;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Server\RequestHandlerInterface;
class ConfigurationProcessor extends ProcessorBase
{
public $id = '_config';
public $title = 'Configuration';
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler) : ResponseInterface
{
$this->startTimer();
$this->container['config']->init();
$this->container['plugins']->setup();
$this->stopTimer();
return $handler->handle($request);
}
}
Arguments
/is/htdocs/wp10977587_Z2OWAV7N6E/www/aktiv-fuer-aktive/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
private $handler;
/** @var ContainerInterface|null */
private $container;
/**
* {@inheritdoc}
* @throws InvalidArgumentException
*/
public function handle(ServerRequestInterface $request): ResponseInterface
{
$middleware = array_shift($this->middleware);
// Use default callable if there is no middleware.
if ($middleware === null) {
return \call_user_func($this->handler, $request);
}
if ($middleware instanceof MiddlewareInterface) {
return $middleware->process($request, clone $this);
}
if (null === $this->container || !$this->container->has($middleware)) {
throw new InvalidArgumentException(
sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
$middleware
);
}
array_unshift($this->middleware, $this->container->get($middleware));
return $this->handle($request);
}
}
Arguments
ServerRequest {#69}
RequestHandler {#93}
/is/htdocs/wp10977587_Z2OWAV7N6E/www/aktiv-fuer-aktive/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
// Use default callable if there is no middleware.
if ($middleware === null) {
return \call_user_func($this->handler, $request);
}
if ($middleware instanceof MiddlewareInterface) {
return $middleware->process($request, clone $this);
}
if (null === $this->container || !$this->container->has($middleware)) {
throw new InvalidArgumentException(
sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
$middleware
);
}
array_unshift($this->middleware, $this->container->get($middleware));
return $this->handle($request);
}
}
Arguments
/is/htdocs/wp10977587_Z2OWAV7N6E/www/aktiv-fuer-aktive/system/src/Grav/Common/Grav.php
},
'debuggerAssetsProcessor' => function () {
return new DebuggerAssetsProcessor($this);
},
'renderProcessor' => function () {
return new RenderProcessor($this);
},
]
);
$default = function (ServerRequestInterface $request) {
return new Response(404, ['Expires' => 0, 'Cache-Control' => 'no-cache, no-store, must-revalidate'], 'Not Found');
};
/** @var Debugger $debugger */
$debugger = $this['debugger'];
$collection = new RequestHandler($this->middleware, $default, $container);
$response = $collection->handle($this['request']);
$body = $response->getBody();
// Handle ETag and If-None-Match headers.
if ($response->getHeaderLine('ETag') === '1') {
$etag = md5($body);
$response = $response->withHeader('ETag', $etag);
if ($this['request']->getHeaderLine('If-None-Match') === $etag) {
$response = $response->withStatus(304);
$body = '';
}
}
$this->header($response);
echo $body;
$debugger->render();
register_shutdown_function([$this, 'shutdown']);
}
Arguments
/is/htdocs/wp10977587_Z2OWAV7N6E/www/aktiv-fuer-aktive/index.php
if (!is_file($autoload)) {
die('Please run: <i>bin/grav install</i>');
}
// Register the auto-loader.
$loader = require $autoload;
use Grav\Common\Grav;
use RocketTheme\Toolbox\Event\Event;
// Get the Grav instance
$grav = Grav::instance(
array(
'loader' => $loader
)
);
// Process the page
try {
$grav->process();
} catch (\Error $e) {
$grav->fireEvent('onFatalException', new Event(array('exception' => $e)));
throw $e;
} catch (\Exception $e) {
$grav->fireEvent('onFatalException', new Event(array('exception' => $e)));
throw $e;
}