diff options
author | Steve Clay <steve@mrclay.org> | 2012-05-16 11:27:25 -0400 |
---|---|---|
committer | Steve Clay <steve@mrclay.org> | 2012-05-16 11:27:25 -0400 |
commit | 7c0215018897bfb578e6116ef9d36e5edc1fe5cf (patch) | |
tree | 79902b31740608a091045f31d32d368ac6b2b70e /views/default/admin | |
parent | 40d35166d3f2211ab76943834a983330413ab761 (diff) | |
download | elgg-7c0215018897bfb578e6116ef9d36e5edc1fe5cf.tar.gz elgg-7c0215018897bfb578e6116ef9d36e5edc1fe5cf.tar.bz2 |
Fixes #2411: Show message when upload exceeds PHP limits, and show limits in Server Info
Diffstat (limited to 'views/default/admin')
-rw-r--r-- | views/default/admin/statistics/server/php.php | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/views/default/admin/statistics/server/php.php b/views/default/admin/statistics/server/php.php index 4a59b95fb..7c6a51383 100644 --- a/views/default/admin/statistics/server/php.php +++ b/views/default/admin/statistics/server/php.php @@ -8,6 +8,15 @@ if (!$php_log) { $php_log = elgg_echo('admin:server:error_log'); } +$post_max_size = elgg_get_ini_setting_in_bytes('post_max_size'); +$upload_max_filesize = elgg_get_ini_setting_in_bytes('upload_max_filesize'); + +$post_max_size_warning = ''; +if ($upload_max_filesize > $post_max_size) { + // @todo show a link to something like http://nigel.mcnie.name/blog/uploadmaxfilesizepostmaxsize-experimentation ? + $post_max_size_warning = elgg_echo('admin:server:warning:post_max_too_small'); +} + ?> <table class="elgg-table-alt"> <tr class="odd"> @@ -30,4 +39,12 @@ if (!$php_log) { <td><b><?php echo elgg_echo('admin:server:label:mem_used'); ?> :</b></td> <td><?php echo number_format(memory_get_peak_usage()); ?></td> </tr> + <tr class="even"> + <td><b><?php echo elgg_echo('admin:server:label:post_max_size'); ?> :</b></td> + <td><?php echo number_format($post_max_size); ?></td> + </tr> + <tr class="odd"> + <td><b><?php echo elgg_echo('admin:server:label:upload_max_filesize'); ?> :</b></td> + <td><?php echo number_format($upload_max_filesize) . ' ' . $post_max_size_warning; ?></td> + </tr> </table> |