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';
$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']));