From 46c058df25472b938b3f41298c805333dec3511f Mon Sep 17 00:00:00 2001 From: slawkens Date: Tue, 28 Dec 2021 07:28:16 +0100 Subject: [PATCH] Save php sessions in myaac dir Instead of default PHP location This fixes problem with permissions --- .gitignore | 4 ++++ common.php | 4 +++- system/php_sessions/index.html | 0 3 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 system/php_sessions/index.html diff --git a/.gitignore b/.gitignore index 671a8abb..f4f0ae30 100644 --- a/.gitignore +++ b/.gitignore @@ -31,6 +31,10 @@ system/cache/* !system/cache/signatures/index.html !system/cache/plugins/index.html +# php sessions +system/php_sessions/* +!system/cache/index.html + # logs system/logs/* !system/logs/index.html diff --git a/common.php b/common.php index 337b4b5e..2f14939e 100644 --- a/common.php +++ b/common.php @@ -24,7 +24,6 @@ * @link https://my-aac.org */ if (version_compare(phpversion(), '7.1', '<')) die('PHP version 7.1 or higher is required.'); -session_start(); const MYAAC = true; const MYAAC_VERSION = '0.9.0-dev'; @@ -87,6 +86,9 @@ const TFS_03 = 4; const TFS_FIRST = TFS_02; const TFS_LAST = TFS_03; +session_save_path(SYSTEM . 'php_sessions'); +session_start(); + // basedir $basedir = ''; $tmp = explode('/', $_SERVER['SCRIPT_NAME']); diff --git a/system/php_sessions/index.html b/system/php_sessions/index.html new file mode 100644 index 00000000..e69de29b