diff options
Diffstat (limited to 'phpBB/common.php')
-rw-r--r-- | phpBB/common.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/phpBB/common.php b/phpBB/common.php index c69ee4395e..f5e81ad1a6 100644 --- a/phpBB/common.php +++ b/phpBB/common.php @@ -99,7 +99,15 @@ else if (defined('IN_CRON')) { chdir($phpbb_root_path); - $phpbb_root_path = getcwd() . '/'; + if (@function_exists('getcwd')) + { + $phpbb_root_path = getcwd() . '/'; + } + else + { + // This is a best guess + $phpbb_root_path = pathinfo($_SERVER['SCRIPT_FILENAME'], PATHINFO_DIRNAME) . '/'; + } } if (!file_exists($phpbb_root_path . 'config.' . $phpEx)) |