mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 08:14:38 +02:00
#12149 added post_max_size notification
This commit is contained in:
parent
e658a35229
commit
48d7a63eb1
@ -1671,6 +1671,10 @@ class ConsoleSupervisor
|
|||||||
ini_get('upload_max_filesize')
|
ini_get('upload_max_filesize')
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$PHPpost_max_size = config_return_in_bytes(
|
||||||
|
ini_get('post_max_size')
|
||||||
|
);
|
||||||
|
|
||||||
// PHP configuration.
|
// PHP configuration.
|
||||||
$PHPmax_input_time = ini_get('max_input_time');
|
$PHPmax_input_time = ini_get('max_input_time');
|
||||||
$PHPmemory_limit = config_return_in_bytes(ini_get('memory_limit'));
|
$PHPmemory_limit = config_return_in_bytes(ini_get('memory_limit'));
|
||||||
@ -1678,6 +1682,7 @@ class ConsoleSupervisor
|
|||||||
$PHPsafe_mode = ini_get('safe_mode');
|
$PHPsafe_mode = ini_get('safe_mode');
|
||||||
$PHPdisable_functions = ini_get('disable_functions');
|
$PHPdisable_functions = ini_get('disable_functions');
|
||||||
$PHPupload_max_filesize_min = config_return_in_bytes('800M');
|
$PHPupload_max_filesize_min = config_return_in_bytes('800M');
|
||||||
|
$PHPpost_max_size_min = config_return_in_bytes('800M');
|
||||||
$PHPmemory_limit_min = config_return_in_bytes('800M');
|
$PHPmemory_limit_min = config_return_in_bytes('800M');
|
||||||
$PHPSerialize_precision = ini_get('serialize_precision');
|
$PHPSerialize_precision = ini_get('serialize_precision');
|
||||||
|
|
||||||
@ -1728,7 +1733,7 @@ class ConsoleSupervisor
|
|||||||
'message' => sprintf(
|
'message' => sprintf(
|
||||||
__('Recommended value is %s'),
|
__('Recommended value is %s'),
|
||||||
'-1 ('.__('Unlimited').')'
|
'-1 ('.__('Unlimited').')'
|
||||||
).'<br><br>'.__('Please, change it on your PHP configuration file (php.ini) or contact with administrator (Do not forget to restart Apache process after)'),
|
).'<br>'.__('Please, change it on your PHP configuration file (php.ini) or contact with administrator (Do not forget to restart Apache process after)'),
|
||||||
'url' => $url,
|
'url' => $url,
|
||||||
'icon_notification' => self::ICON_INFORMATION,
|
'icon_notification' => self::ICON_INFORMATION,
|
||||||
]
|
]
|
||||||
@ -1753,7 +1758,7 @@ class ConsoleSupervisor
|
|||||||
'message' => sprintf(
|
'message' => sprintf(
|
||||||
__('Recommended value is: %s'),
|
__('Recommended value is: %s'),
|
||||||
'0 ('.__('Unlimited').')'
|
'0 ('.__('Unlimited').')'
|
||||||
).'<br><br>'.__('Please, change it on your PHP configuration file (php.ini) or contact with administrator (Dont forget restart apache process after changes)'),
|
).'<br>'.__('Please, change it on your PHP configuration file (php.ini) or contact with administrator (Dont forget restart apache process after changes)'),
|
||||||
'url' => $url,
|
'url' => $url,
|
||||||
'icon_notification' => self::ICON_INFORMATION,
|
'icon_notification' => self::ICON_INFORMATION,
|
||||||
]
|
]
|
||||||
@ -1778,7 +1783,7 @@ class ConsoleSupervisor
|
|||||||
'message' => sprintf(
|
'message' => sprintf(
|
||||||
__('Recommended value is: %s'),
|
__('Recommended value is: %s'),
|
||||||
sprintf(__('%s or greater'), '800M')
|
sprintf(__('%s or greater'), '800M')
|
||||||
).'<br><br>'.__('Please, change it on your PHP configuration file (php.ini) or contact with administrator (Dont forget restart apache process after changes)'),
|
).'<br>'.__('Please, change it on your PHP configuration file (php.ini) or contact with administrator (Dont forget restart apache process after changes)'),
|
||||||
'url' => $url,
|
'url' => $url,
|
||||||
'icon_notification' => self::ICON_INFORMATION,
|
'icon_notification' => self::ICON_INFORMATION,
|
||||||
]
|
]
|
||||||
@ -1808,7 +1813,7 @@ class ConsoleSupervisor
|
|||||||
'message' => sprintf(
|
'message' => sprintf(
|
||||||
__('Recommended value is: %s'),
|
__('Recommended value is: %s'),
|
||||||
sprintf(__('%s or greater'), $recommended_memory)
|
sprintf(__('%s or greater'), $recommended_memory)
|
||||||
).'<br><br>'.__('Please, change it on your PHP configuration file (php.ini) or contact with administrator'),
|
).'<br>'.__('Please, change it on your PHP configuration file (php.ini) or contact with administrator'),
|
||||||
'url' => $url,
|
'url' => $url,
|
||||||
'icon_notification' => self::ICON_INFORMATION,
|
'icon_notification' => self::ICON_INFORMATION,
|
||||||
]
|
]
|
||||||
@ -1915,6 +1920,25 @@ class ConsoleSupervisor
|
|||||||
} else {
|
} else {
|
||||||
$this->cleanNotifications('NOTIF.PHP.VERSION.SUPPORT');
|
$this->cleanNotifications('NOTIF.PHP.VERSION.SUPPORT');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($PHPpost_max_size < $PHPpost_max_size_min && (int) $PHPpost_max_size !== -1) {
|
||||||
|
$url = 'https://www.php.net/manual/en/ini.core.php#ini.post-max-size';
|
||||||
|
$this->notify(
|
||||||
|
[
|
||||||
|
'type' => 'NOTIF.PHP.POST_MAX_SIZE',
|
||||||
|
'title' => __('PHP POST MAX SIZE'),
|
||||||
|
'message' => sprintf(
|
||||||
|
__('Recommended value is: %s'),
|
||||||
|
sprintf(__('%sM or greater'), ($PHPpost_max_size_min / 1024 / 1024))
|
||||||
|
).'<br>'.__('Please, change it on your PHP configuration file (php.ini) or contact with administrator'),
|
||||||
|
'url' => $url,
|
||||||
|
'icon_notification' => self::ICON_HEADSUP,
|
||||||
|
]
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
$this->cleanNotifications('NOTIF.PHP.POST_MAX_SIZE');
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -533,6 +533,10 @@ class Diagnostics extends Wizard
|
|||||||
'name' => __('PHP Memory limit'),
|
'name' => __('PHP Memory limit'),
|
||||||
'value' => ini_get('memory_limit'),
|
'value' => ini_get('memory_limit'),
|
||||||
],
|
],
|
||||||
|
'postMaxSize' => [
|
||||||
|
'name' => __('PHP Post max size'),
|
||||||
|
'value' => ini_get('post_max_size'),
|
||||||
|
],
|
||||||
'sessionLifetime' => [
|
'sessionLifetime' => [
|
||||||
'name' => __('Session cookie lifetime'),
|
'name' => __('Session cookie lifetime'),
|
||||||
'value' => ini_get('session.cookie_lifetime'),
|
'value' => ini_get('session.cookie_lifetime'),
|
||||||
|
@ -1229,6 +1229,14 @@ if (is_ajax()) {
|
|||||||
<th style="width: 65%;">
|
<th style="width: 65%;">
|
||||||
<p style="font-size: 10pt;">'.$php_sys->data->memoryLimit->value.'</p>
|
<p style="font-size: 10pt;">'.$php_sys->data->memoryLimit->value.'</p>
|
||||||
</th>
|
</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th style="width: 35%;">
|
||||||
|
<p><span>'.$php_sys->data->postMaxSize->name.'</span></p>
|
||||||
|
</th>
|
||||||
|
<th style="width: 65%;">
|
||||||
|
<p style="font-size: 10pt;">'.$php_sys->data->postMaxSize->value.'</p>
|
||||||
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th style="width: 35%;">
|
<th style="width: 35%;">
|
||||||
|
@ -133,6 +133,7 @@ function notifications_get_subtypes(?string $source=null)
|
|||||||
'NOTIF.PHP.INPUT_TIME',
|
'NOTIF.PHP.INPUT_TIME',
|
||||||
'NOTIF.PHP.EXECUTION_TIME',
|
'NOTIF.PHP.EXECUTION_TIME',
|
||||||
'NOTIF.PHP.UPLOAD_MAX_FILESIZE',
|
'NOTIF.PHP.UPLOAD_MAX_FILESIZE',
|
||||||
|
'NOTIF.PHP.POST_MAX_SIZE',
|
||||||
'NOTIF.PHP.MEMORY_LIMIT',
|
'NOTIF.PHP.MEMORY_LIMIT',
|
||||||
'NOTIF.PHP.DISABLE_FUNCTIONS',
|
'NOTIF.PHP.DISABLE_FUNCTIONS',
|
||||||
'NOTIF.PHP.CHROMIUM',
|
'NOTIF.PHP.CHROMIUM',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user