From 13f114f30e38bcee734d4a1307253b8b216cbda6 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Sat, 17 Jul 2021 21:50:30 +0100 Subject: [PATCH] bootstrap: report loaded php.ini in error, as well as php binary path in some cases extension loading issues are caused by incorrect php.ini path, which should be easy to spot if the path is given. --- src/pocketmine/PocketMine.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pocketmine/PocketMine.php b/src/pocketmine/PocketMine.php index 0dd40ddb8..d1afc6845 100644 --- a/src/pocketmine/PocketMine.php +++ b/src/pocketmine/PocketMine.php @@ -177,10 +177,12 @@ JIT_WARNING if(count($messages = check_platform_dependencies()) > 0){ echo PHP_EOL; $binary = version_compare(PHP_VERSION, "5.4") >= 0 ? PHP_BINARY : "unknown"; - critical_error("Selected PHP binary ($binary) does not satisfy some requirements."); + critical_error("Selected PHP binary does not satisfy some requirements."); foreach($messages as $m){ echo " - $m" . PHP_EOL; } + critical_error("PHP binary used: " . $binary); + critical_error("Loaded php.ini: " . (($file = php_ini_loaded_file()) !== false ? $file : "none")); critical_error("Please recompile PHP with the needed configuration, or refer to the installation instructions at http://pmmp.rtfd.io/en/rtfd/installation.html."); echo PHP_EOL; exit(1);