#903 Installer checks for needed PHP functions #937

This commit is contained in:
dhanrajbsheth 2020-05-26 00:55:16 +05:30
parent 07abc7d294
commit 6f5a72cbe3
No known key found for this signature in database
GPG Key ID: 965DC4E5A1DC9433
1 changed files with 45 additions and 0 deletions

View File

@ -102,6 +102,51 @@ class InstallController extends AbstractController
$errors++;
$this->addMessage('The PDO MySQL driver needs to be installed.', 'error');
}
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(
'You should set a timezone in your php.ini file (e.g. \'date.timezone = UTC\').