MAPG-131 split web specific code from main.php to web.php

set the new session handler as session handler
configure session with longer lifetime and with stricter cookie settings
This commit is contained in:
bence committed 2020-06-13 20:45:36 +02:00
1 parent dbd16d6cbe
commit 013668e3d6
3 files changed
+42 -30

No files matched your search

+1 -11
View File
@@ -10,21 +10,11 @@ const REVISION_DATE = '';
$dotenv = Dotenv\Dotenv::createImmutable(ROOT);
$dotenv->load();
if (!empty($_ENV['DEV'])) {
error_reporting(E_ALL);
ini_set('display_errors', '1');
} else {
ini_set('display_errors', '0');
}
class Container
{
static MapGuesser\Interfaces\Database\IConnection $dbConnection;
static MapGuesser\Routing\RouteCollection $routeCollection;
static \SessionHandlerInterface $sessionHandler;
}
Container::$dbConnection = new MapGuesser\Database\Mysql\Connection($_ENV['DB_HOST'], $_ENV['DB_USER'], $_ENV['DB_PASSWORD'], $_ENV['DB_NAME']);
Container::$routeCollection = new MapGuesser\Routing\RouteCollection();
session_start();