mirror of
https://github.com/Mibew/mibew.git
synced 2025-03-03 18:38:31 +03:00
Check that all needed PHP extensions are loaded before install
This commit is contained in:
parent
80077be185
commit
7ac85ac412
@ -123,6 +123,11 @@ class Installer
|
|||||||
array(Utils::formatVersionId($this->getPhpVersionId()))
|
array(Utils::formatVersionId($this->getPhpVersionId()))
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (!$this->checkPhpExtensions()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
$this->log[] = getlocal('All necessary PHP extensions are loaded');
|
||||||
|
|
||||||
if (!$this->checkFsPermissions()) {
|
if (!$this->checkFsPermissions()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -476,6 +481,27 @@ class Installer
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks that all necessary PHP extensions are loaded.
|
||||||
|
*
|
||||||
|
* @return boolean True if all necessary extensions are loaded and false
|
||||||
|
* otherwise.
|
||||||
|
*/
|
||||||
|
protected function checkPhpExtensions()
|
||||||
|
{
|
||||||
|
$extensions = array('PDO', 'pdo_mysql', 'gd', 'iconv');
|
||||||
|
|
||||||
|
foreach ($extensions as $ext) {
|
||||||
|
if (!extension_loaded($ext)) {
|
||||||
|
$this->errors[] = getlocal('PHP {0} extension is not loaded', array($ext));
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if files and directories permissions are correct.
|
* Checks if files and directories permissions are correct.
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user