PHP sessions will be stored in the "storage" directory (fixes #241)

(cherry picked from commit 557c282)
This commit is contained in:
alext 2016-11-13 12:25:02 +01:00
parent 7d76053069
commit 8474ef8be2
5 changed files with 43 additions and 12 deletions

19
.gitignore vendored
View file

@ -1,17 +1,20 @@
.idea .idea/
.tmp-package .tmp-package/
composer composer/
easyappointments.zip *.zip
node_modules node_modules/
npm-debug.log npm-debug.log
src/storage/cache/* src/storage/cache/*
!src/storage/cache/.htaccess !src/storage/cache/.htaccess
!src/storage/cache/index.html !src/storage/cache/index.html
src/storage/logs/* src/storage/logs/*
!src/storage/logs/index.html !src/storage/logs/index.html
src/storage/sessions/*
!src/storage/sessions/.htaccess
!src/storage/sessions/index.html
src/storage/uploads/* src/storage/uploads/*
!src/storage/uploads/index.html !src/storage/uploads/index.html
src/config.php src/config.php
doc/apigen doc/apigen/
doc/jsdoc doc/jsdoc/
doc/plato doc/plato/

View file

@ -51,8 +51,25 @@ gulp.task('build', function(done) {
fs.copySync('LICENSE', '.tmp-package/LICENSE'); fs.copySync('LICENSE', '.tmp-package/LICENSE');
del.sync([ del.sync([
'.tmp-package/application/logs/*', '.tmp-package/storage/uploads/*',
'!.tmp-package/application/logs/index.html' '!.tmp-package/storage/uploads/index.html'
]);
del.sync([
'.tmp-package/storage/logs/*',
'!.tmp-package/storage/logs/index.html'
]);
del.sync([
'.tmp-package/storage/sessions/*',
'!.tmp-package/storage/sessions/.htaccess',
'!.tmp-package/storage/sessions/index.html'
]);
del.sync([
'.tmp-package/storage/cache/*',
'!.tmp-package/storage/cache/.htaccess',
'!.tmp-package/storage/cache/index.html'
]); ]);
zip('.tmp-package', { saveTo: 'easyappointments.zip' }, function (err, buffer) { zip('.tmp-package', { saveTo: 'easyappointments.zip' }, function (err, buffer) {

View file

@ -292,9 +292,9 @@ $config['encryption_key'] = Config::BASE_URL;
| |
*/ */
$config['sess_driver'] = 'files'; $config['sess_driver'] = 'files';
$config['sess_cookie_name'] = 'ci_session'; $config['sess_cookie_name'] = 'ea_session';
$config['sess_expiration'] = 7200; $config['sess_expiration'] = 7200;
$config['sess_save_path'] = NULL; $config['sess_save_path'] = __DIR__ . '/../../storage/sessions';
$config['sess_match_ip'] = FALSE; $config['sess_match_ip'] = FALSE;
$config['sess_time_to_update'] = 300; $config['sess_time_to_update'] = 300;
$config['sess_regenerate_destroy'] = FALSE; $config['sess_regenerate_destroy'] = FALSE;

View file

@ -0,0 +1 @@
deny from all

View file

@ -0,0 +1,10 @@
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>