From 89488cab2a9bec9117da6e2a9812dae2758a4560 Mon Sep 17 00:00:00 2001 From: Bryan Pedini Date: Fri, 19 Jul 2019 10:34:30 +0200 Subject: [PATCH] added session cookie lifetime, modified installer accordingly --- index.php | 1 + lib/php/install.php | 1 + 2 files changed, 2 insertions(+) diff --git a/index.php b/index.php index 0d50e43..aec47a8 100644 --- a/index.php +++ b/index.php @@ -12,6 +12,7 @@ } require_once ( 'functions.php' ); $config = load_config ( ); + session_set_cookie_params ( 43200, $config [ 'installation_path' ], $config [ 'domain' ], true ); if ( isset ( $request_uri [ 0 ] ) && $request_uri [ 0 ] != "" ) { switch ( $request_uri [ 0 ] ) { case "go": diff --git a/lib/php/install.php b/lib/php/install.php index aa52a0a..8b43945 100644 --- a/lib/php/install.php +++ b/lib/php/install.php @@ -14,6 +14,7 @@ 'name' => $_POST [ 'db_name' ], ], 'installation_path' => substr ( $_SERVER [ 'SCRIPT_NAME' ], 0, -10 ), + 'domain' => $_SERVER [ 'HTTP_HOST' ], ]; file_put_contents ( 'config.json', json_encode ( $config ) ); try {