aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/common.php
diff options
context:
space:
mode:
authorDavid M <davidmj@users.sourceforge.net>2006-08-17 04:26:07 +0000
committerDavid M <davidmj@users.sourceforge.net>2006-08-17 04:26:07 +0000
commitcfc23dd56220025d6cfcff6d393b97843ad44d02 (patch)
tree534f53226e7bfad25434354e73ad454a13432f03 /phpBB/common.php
parent10f1be96ffba4798d1ea6815cc398b73e886aa5a (diff)
downloadforums-cfc23dd56220025d6cfcff6d393b97843ad44d02.tar
forums-cfc23dd56220025d6cfcff6d393b97843ad44d02.tar.gz
forums-cfc23dd56220025d6cfcff6d393b97843ad44d02.tar.bz2
forums-cfc23dd56220025d6cfcff6d393b97843ad44d02.tar.xz
forums-cfc23dd56220025d6cfcff6d393b97843ad44d02.zip
- getcwd replacement
- realpath stuff thanks to Chris git-svn-id: file:///svn/phpbb/trunk@6296 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/common.php')
-rw-r--r--phpBB/common.php10
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))