Installer checks for needed PHP functions (#939)

Closes #903.
This commit is contained in:
dhanrajbsheth 2020-05-26 01:06:57 +05:30 committed by GitHub
parent 2a15b31ecd
commit f5db23b1e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 47 additions and 0 deletions

View File

@ -101,6 +101,53 @@ class InstallController extends AbstractController
if (!in_array('mysql', \PDO::getAvailableDrivers())) {
$errors++;
$this->addMessage('The PDO MySQL driver needs to be installed.', 'error');
} else {
$this->addMessage('PHP PDO MySQL driver found', 'success');
}
if (!extension_loaded('filter')) {
$this->addMessage('PHP is installed without the filter module. Please install filter.', 'warning');
} else {
$this->addMessage('PHP filter module found', 'success');
}
if (!extension_loaded('ctype')) {
$this->addMessage('PHP is installed without the ctype module. Please install ctype.', 'warning');
} else {
$this->addMessage('PHP ctype module found', 'success');
}
if (!extension_loaded('hash')) {
$this->addMessage('PHP is installed without the hash module. Please install hash.', 'warning');
} else {
$this->addMessage('PHP hash module found', 'success');
}
if (!extension_loaded('json')) {
$this->addMessage('PHP is installed without the json module. Please install json.', 'warning');
} else {
$this->addMessage('PHP json module found', 'success');
}
if (!extension_loaded('libxml')) {
$this->addMessage('PHP is installed without the libxml module. Please install libxml.', 'warning');
} else {
$this->addMessage('PHP libxml module found', 'success');
}
if (!extension_loaded('openssl')) {
$this->addMessage('PHP is installed without the openssl module. Please install openssl.', 'warning');
} else {
$this->addMessage('PHP openssl module found', 'success');
}
if (!extension_loaded('pcre')) {
$this->addMessage('PHP is installed without the pcre module. Please install pcre.', 'warning');
} else {
$this->addMessage('PHP pcre module found', 'success');
}
if (!extension_loaded('sockets')) {
$this->addMessage('PHP is installed without the sockets module. Please install sockets.', 'warning');
} else {
$this->addMessage('PHP sockets module found', 'success');
}
if (!extension_loaded('xml')) {
$this->addMessage('PHP is installed without the xml module. Please install xml.', 'warning');
} else {
$this->addMessage('PHP xml module found', 'success');
}
if (!ini_get('date.timezone')) {
$this->addMessage(