From d58d7f79e7c11d5867131cdf6bfe23f78934aa61 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 5bcd8c38..008368bf 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 048a738c..9d16d4bf 100644 --- a/common.php +++ b/common.php @@ -24,7 +24,6 @@ * @link https://my-aac.org */ if (version_compare(phpversion(), '5.6', '<')) die('PHP version 5.6 or higher is required.'); -session_start(); define('MYAAC', true); define('MYAAC_VERSION', '0.8.6'); @@ -86,6 +85,9 @@ define('TFS_03', 4); define('TFS_FIRST', TFS_02); define('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