diff --git a/setup/precheckup.php b/setup/precheckup.php index d773fa7..21ba2ce 100644 --- a/setup/precheckup.php +++ b/setup/precheckup.php @@ -149,12 +149,31 @@ $phpversion4 = phpversion() < '4' ? 'No ( $phpversion43 = phpversion() < '4.3' ? 'No (PHP 4.3 is recommended)' : 'Yes'; $phpversion5 = phpversion() >= '5' ? 'No (KnowledgeTree does not yet work with PHP5)' : 'Yes'; +function running_user() { + if (substr(PHP_OS, 0, 3) == "WIN") { + return null; + } + if (extension_loaded("posix")) { + $uid = posix_getuid(); + $userdetails = posix_getpwuid($uid); + return $userdetails['name']; + } + if (file_exists('/usr/bin/whoami')) { + return exec('/usr/bin/whoami'); + } + if (file_exists('/usr/bin/id')) { + return exec('/usr/bin/id -nu'); + } + return null; +} + ?> KnowledgeTree Checkup @@ -283,6 +302,18 @@ PHP you are running, and which modules are available.

+log and Documents directories."; +} else { + $message = 'KnowledgeTree will be run as the ' . $username . ' system user, and must be able to write to the log and Documents directories.'; +} +?> + + + +
General