aboutsummaryrefslogtreecommitdiff
path: root/system.php
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2009-05-16 17:05:30 +0000
committerCash Costello <cash.costello@gmail.com>2009-05-16 17:05:30 +0000
commita263f54550563810e38de2c56f69e86269db7c80 (patch)
tree19df852783f8553b8a8cf9fb7d7ca17423b2b7e6 /system.php
parentdd3fcae605c590c76ebfc5584a9a5e33c7fe2a40 (diff)
downloadelgg-a263f54550563810e38de2c56f69e86269db7c80.tar.gz
elgg-a263f54550563810e38de2c56f69e86269db7c80.tar.bz2
added some basic server stats to help guide configuration
Diffstat (limited to 'system.php')
-rw-r--r--system.php74
1 files changed, 64 insertions, 10 deletions
diff --git a/system.php b/system.php
index d9abcd2e5..0e218d3f3 100644
--- a/system.php
+++ b/system.php
@@ -16,21 +16,75 @@
$title = 'TidyPics Server Analysis';
-/*
-$php_ok = (function_exists('version_compare') && version_compare(phpversion(), '4.3.0', '>='));
-$xml_ok = extension_loaded('xml');
-$pcre_ok = extension_loaded('pcre');
-$curl_ok = function_exists('curl_exec');
-$zlib_ok = extension_loaded('zlib');
-$mbstring_ok = extension_loaded('mbstring');
-$iconv_ok = extension_loaded('iconv');
-*/
+
+ function tp_readable_size($bytes)
+ {
+ $size = $bytes / 1024;
+ if ($size < 1024) {
+ $size = number_format($size, 2);
+ $size .= ' KB';
+ } else {
+ $size = $size / 1024;
+ if($size < 1024) {
+ $size = number_format($size, 2);
+ $size .= ' MB';
+ } else {
+ $size = $size / 1024;
+ $size = number_format($size, 2);
+ $size .= ' GB';
+ }
+ }
+ return $size;
+ }
+
+
ob_start();
echo elgg_view_title($title);
?>
<div class="contentWrapper">
-
+ <table width="100%">
+ <tr>
+ <td>PHP version</td>
+ <td><?php echo phpversion(); ?></td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>GD</td>
+ <td><?php echo (extension_loaded('gd')) ? 'Enabled' : 'Disabled'; ?></td>
+ <td>Elgg requires the GD extension to be loaded</td>
+ </tr>
+ <tr>
+ <td>Memory Available to PHP</td>
+ <td><?php echo ini_get('memory_limit'); ?>B</td>
+ <td>Change memory_limit to increase</td>
+ </tr>
+ <tr>
+ <td>Memory Used to Load This Page</td>
+ <td><?php if (function_exists('memory_get_peak_usage')) echo tp_readable_size(memory_get_peak_usage()); ?></td>
+ <td>This is approximately the minimum per page</td>
+ </tr>
+ <tr>
+ <td>Max File Upload Size</td>
+ <td><?php echo tp_readable_size(ini_get('upload_max_filesize')); ?></td>
+ <td>Max size of the sum of images uploaded at once</td>
+ </tr>
+ <tr>
+ <td>Max Post Size</td>
+ <td><?php echo tp_readable_size(ini_get('post_max_size')); ?></td>
+ <td>Max post size - should be larger than above</td>
+ </tr>
+ <tr>
+ <td>Max Input Time</td>
+ <td><?php echo ini_get('max_input_time'); ?> s</td>
+ <td>Time script waits for upload to finish</td>
+ </tr>
+ <tr>
+ <td>Max Execution Time</td>
+ <td><?php echo ini_get('max_execution_time'); ?> s</td>
+ <td>Max time a script will run</td>
+ </tr>
+ </table>
</div>
<?php