Skip to content

Commit

Permalink
Dev: better fix for runtimePath : test tmp/runtime, really one used
Browse files Browse the repository at this point in the history
  • Loading branch information
Shnoulle committed Dec 17, 2016
1 parent f600ad4 commit 2f9b7ee
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions application/commands/console.php
Expand Up @@ -36,12 +36,12 @@
}
unset ($config['defaultController']);
unset ($config['config']);
/* fix tempdir for runtime path, unsure you can lauch function anywhere (if you use php /var/www/limesurvey/... : can be /root/ for config */
$tempdir=$settings['tempdir'];
if(!is_dir($tempdir)){
$tempdir=str_replace($settings['rootdir'],dirname(dirname(dirname(__FILE__))),$settings['tempdir']);
/* fix runtime path, unsure you can lauch function anywhere (if you use php /var/www/limesurvey/... : can be /root/ for config */
$runtimePath=$settings['tempdir'].'/runtime';
if(!is_dir($runtimePath) || !is_writable($runtimePath)){
$runtimePath=str_replace($settings['rootdir'],dirname(dirname(dirname(__FILE__))),$runtimePath);
}
$config['runtimePath']=$tempdir.'/runtime';
$config['runtimePath']=$runtimePath;

// fix for fcgi
defined('STDIN') or define('STDIN', fopen('php://stdin', 'r'));
Expand Down

0 comments on commit 2f9b7ee

Please sign in to comment.