X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=install%2Findex.php;h=585cea24ac0112f1630ee3039f728031395c1451;hb=9664ffdbd9683f0b7d2d702d4c134933bf2e8d50;hp=9d86c115e18545f3162d6f05d7afcf49852e245b;hpb=72dd1486b4e771fecb7c47c8b7da4f92bda94ebf;p=civicrm-core.git diff --git a/install/index.php b/install/index.php index 9d86c115e1..585cea24ac 100644 --- a/install/index.php +++ b/install/index.php @@ -91,6 +91,15 @@ else { errorDisplayPage($errorTitle, $errorMsg, FALSE); } +$composerJsonPath = dirname(__DIR__) . DIRECTORY_SEPARATOR . 'composer.json'; +if (file_exists($composerJsonPath)) { + $composerJson = json_decode(file_get_contents($composerJsonPath), 1); + $minPhpVer = preg_replace(';[~^];', '', $composerJson['require']['php']); + if (!version_compare(phpversion(), $minPhpVer, '>=')) { + errorDisplayPage('PHP Version Requirement', sprintf("CiviCRM requires PHP %s+. The web server is running PHP %s.", $minPhpVer, phpversion()), FALSE); + } +} + $pkgPath = $crmPath . DIRECTORY_SEPARATOR . 'packages'; require_once $crmPath . '/CRM/Core/ClassLoader.php'; @@ -703,16 +712,6 @@ class InstallRequirements { $this->requireWriteable($dirName, $testDetails, TRUE); } - //check for Config.IDS.ini, file may exist in re-install - $configIDSiniDir = array($cmsPath, 'sites', $siteDir, 'files', 'civicrm', 'upload', 'Config.IDS.ini'); - - if (is_array($configIDSiniDir) && !empty($configIDSiniDir)) { - $configIDSiniFile = implode(CIVICRM_DIRECTORY_SEPARATOR, $configIDSiniDir); - if (file_exists($configIDSiniFile)) { - unlink($configIDSiniFile); - } - } - // Check for rewriting if (isset($_SERVER['SERVER_SOFTWARE'])) { $webserver = strip_tags(trim($_SERVER['SERVER_SOFTWARE'])); @@ -1421,7 +1420,7 @@ class InstallRequirements { $result = mysqli_query($conn, 'DROP TABLE civicrm_utf8mb4_test'); // Ensure that the MySQL driver supports utf8mb4 encoding. - $version = mysqli_get_client_info($conn); + $version = mysqli_get_client_info(); if (strpos($version, 'mysqlnd') !== FALSE) { // The mysqlnd driver supports utf8mb4 starting at version 5.0.9. $version = preg_replace('/^\D+([\d.]+).*/', '$1', $version);