summaryrefslogtreecommitdiff
path: root/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'index.php')
-rw-r--r--index.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/index.php b/index.php
index a9310500..9d278e62 100644
--- a/index.php
+++ b/index.php
@@ -49,7 +49,11 @@ if (PHP_SAPI == 'cli') {
@system('mkdir -p test/var/logs');
define('VARPATH', realpath('test/var') . '/');
} else {
- define('VARPATH', realpath('var') . '/');
+ if (file_exists('var')) {
+ define('VARPATH', realpath('var') . '/');
+ } else {
+ define('VARPATH', getcwd() . "/var/");
+ }
}
// Initialize.