diff --git a/htdocs/admin/system/phpinfo.php b/htdocs/admin/system/phpinfo.php index 05038c13bbc..9f1766a5d22 100644 --- a/htdocs/admin/system/phpinfo.php +++ b/htdocs/admin/system/phpinfo.php @@ -265,14 +265,19 @@ $db->close(); */ function getActivatedExtensions() { - $file = getConfigFilePath(); - $handle = fopen(GetConfigFilePath(), "r"); + $file = trim(getConfigFilePath()); + $handle = fopen($file, "r"); $content = fread($handle, filesize($file)); fclose($handle); $configLines = explode("\r", $content); + // For compatibility with LF (Line Feed) + if (empty($configLines) || count($configLines) < 2) { + $configLines = explode("\n", $content); + } + $extensions = array(); $lastLine = ""; @@ -281,11 +286,13 @@ function getActivatedExtensions() $line = trim($line); // ignore comment lines - if (substr($line, 0, 1) === ";") + if (substr($line, 0, 1) === ";" || empty($line)) { continue; } + // var_dump($line); + // extension if (substr($line, 0, 9) === "extension" && substr($line, 0, 10) !== "extension_") {