diff options
author | robocoder <anthon.pang@gmail.com> | 2009-10-24 20:52:14 +0400 |
---|---|---|
committer | robocoder <anthon.pang@gmail.com> | 2009-10-24 20:52:14 +0400 |
commit | c9a6beb2dc6d5239fbfe1702699c8cb3fc553198 (patch) | |
tree | 5e435ddbbc84f56e6a978e2c4e54f496d1731d2b /index.php | |
parent | 07866a7682ab8b511fd04571ec09fe3eb7dc2aec (diff) |
Previously, we would always test if session.savepath is writable. However, some users report spurious warnings in the log file (open_basedir restriction). The rationale for this test is to handle the case where a fresh PHP install has not been properly configured.
So, we add test for open_basedir restriction. By default, this is not set.
- if not set, we test to see if the session.savepath is writable. This would handle the case where a fresh PHP install has not been configured.
- if it has been set, we assume session.savepath is writable.
git-svn-id: http://dev.piwik.org/svn/trunk@1536 59fd770c-687e-43c8-a1e3-f5a4ff64c105
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -52,7 +52,7 @@ if(ini_get('session.save_handler') == 'user') } if(ini_get('session.save_handler') == 'files') { - if(!@is_writable(ini_get('session.save_path'))) + if(!ini_get('open_basedir') && !@is_writable(ini_get('session.save_path'))) { $sessionPath = PIWIK_USER_PATH . '/tmp/sessions'; @ini_set('session.save_path', $sessionPath); |