Better check for server system (patch #1462738).

This commit is contained in:
Michal Čihař
2006-04-10 13:01:05 +00:00
parent fd0bb46fa4
commit c53264cac0
2 changed files with 13 additions and 4 deletions

View File

@@ -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);
}
}
}