mirror of
https://github.com/humhub/humhub.git
synced 2025-01-29 04:17:39 +01:00
Enh #4026: Check memory limit in prerequisites check
This commit is contained in:
parent
c746573a8f
commit
7b06ffff6d
@ -12,6 +12,7 @@ HumHub Change Log
|
||||
- Fix #4019: Animated Gifs not handled correctly with GMagick extension
|
||||
- Fix #4021: Activity mail queue job timeout error handling
|
||||
- Fix #4005: The uploaded logo is scaled too small.
|
||||
- Enh #4026: Check memory limit in prerequisites check
|
||||
|
||||
|
||||
1.5.0 (April 15, 2020)
|
||||
|
@ -318,8 +318,35 @@ class SelfTest
|
||||
}
|
||||
|
||||
|
||||
$memoryLimit = ini_get('memory_limit');
|
||||
if (preg_match('/^(\d+)(.)$/', $memoryLimit, $m)) {
|
||||
if ($m[2] == 'G') {
|
||||
$memoryLimit = $m[1] * 1024 * 1024 * 1024;
|
||||
} elseif ($m[2] == 'M') {
|
||||
$memoryLimit = $m[1] * 1024 * 1024;
|
||||
} elseif ($m[2] == 'K') {
|
||||
$memoryLimit = $m[1] * 1024;
|
||||
}
|
||||
}
|
||||
|
||||
// Check PHP Memory Limit
|
||||
$title = 'PHP - Memory Limit (64 MB)';
|
||||
if ($memoryLimit >= 64 * 1024 * 1024) {
|
||||
$checks[] = [
|
||||
'title' => Yii::t('base', $title),
|
||||
'state' => 'OK',
|
||||
'hint' => 'Current limit is: ' . Yii::$app->formatter->asShortSize($memoryLimit, 0)
|
||||
];
|
||||
} else {
|
||||
$checks[] = [
|
||||
'title' => Yii::t('base', $title),
|
||||
'state' => 'WARNING',
|
||||
'hint' => 'Increase memory limit in php.ini - Current limit is: ' . Yii::$app->formatter->asShortSize($memoryLimit, 0)
|
||||
];
|
||||
}
|
||||
|
||||
// Checks LDAP Extension
|
||||
$title = 'LDAP Support';
|
||||
$title = 'PHP - LDAP Support';
|
||||
|
||||
if (LdapHelper::isLdapAvailable()) {
|
||||
$checks[] = [
|
||||
|
Loading…
x
Reference in New Issue
Block a user