diff --git a/ChangeLog b/ChangeLog index fbfb64059..b5b3a07cf 100755 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,8 @@ $Source$ 2006-04-10 Michal Čihař * libraries/Config.class.php: Check also default config mtime (bug #1467620). + * libraries/Config.class.php: Better check for server system (patch + #1462738). 2006-04-09 Marc Delisle * tbl_replace.php, libraries/dbi/mysqli.dbi.lib.php: bug #1255923, diff --git a/libraries/Config.class.php b/libraries/Config.class.php index 6bd60c2b6..ac31183c8 100644 --- a/libraries/Config.class.php +++ b/libraries/Config.class.php @@ -247,10 +247,17 @@ class PMA_Config */ function checkWebServerOs() { - if (defined('PHP_OS') && stristr(PHP_OS, 'win')) { - $this->set('PMA_IS_WINDOWS', 1); - } else { - $this->set('PMA_IS_WINDOWS', 0); + // Default to Unix or Equiv + $this->set('PMA_IS_WINDOWS', 0); + // If PHP_OS is defined then continue + if (defined('PHP_OS')) { + if (stristr(PHP_OS, 'win') ) { + // Is it some version of Windows + $this->set('PMA_IS_WINDOWS', 1); + } elseif (stristr(PHP_OS, 'OS/2')) { + // Is it OS/2 (No file permissions like Windows) + $this->set('PMA_IS_WINDOWS', 1); + } } }