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.
This commit is contained in:
Dylan K. Taylor 2021-07-17 21:50:30 +01:00
parent eccd258aeb
commit 13f114f30e
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

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