Elgg  Version 3.0
php.php
Go to the documentation of this file.
1 <?php
6 $php_log = ini_get('error_log');
7 if (!$php_log) {
8  $php_log = elgg_echo('admin:server:error_log');
9 }
10 
13 
16  // @todo show a link to something like http://nigel.mcnie.name/blog/uploadmaxfilesizepostmaxsize-experimentation ?
17  $post_max_size_warning = elgg_echo('admin:server:warning:post_max_too_small');
18 }
19 
20 ?>
21 <table class="elgg-table-alt">
22  <tr>
23  <td><b><?= elgg_echo('admin:server:label:php_version'); ?></b></td>
24  <td><?= phpversion(); ?></td>
25  </tr>
26  <tr>
27  <td><b><?= elgg_echo('admin:server:label:php_ini'); ?></b></td>
28  <td><?= php_ini_loaded_file(); ?></td>
29  </tr>
30  <tr>
31  <td><b><?= elgg_echo('admin:server:label:php_log'); ?></b></td>
32  <td><?= $php_log; ?></td>
33  </tr>
34  <tr>
35  <td><b><?= elgg_echo('admin:server:label:mem_avail'); ?></b></td>
36  <td><?= number_format(elgg_get_ini_setting_in_bytes('memory_limit')); ?></td>
37  </tr>
38  <tr>
39  <td><b><?= elgg_echo('admin:server:label:mem_used'); ?></b></td>
40  <td><?= number_format(memory_get_peak_usage()); ?></td>
41  </tr>
42  <tr>
43  <td><b><?= elgg_echo('admin:server:label:post_max_size'); ?></b></td>
44  <td><?= number_format($post_max_size); ?></td>
45  </tr>
46  <tr>
47  <td><b><?= elgg_echo('admin:server:label:upload_max_filesize'); ?></b></td>
48  <td><?= number_format($upload_max_filesize) . '&nbsp; ' . $post_max_size_warning; ?></td>
49  </tr>
50 </table>
51 <?php
52 // Show phpinfo page
53 if (elgg_get_config('allow_phpinfo') !== true) {
54  return;
55 }
56 
57 echo elgg_format_element('div', ['class' => 'mts'], elgg_view('output/url', [
58  'text' => elgg_echo('admin:server:label:phpinfo'),
59  'href' => 'phpinfo',
60  'target' => '_blank',
61 ]));
if(!$php_log) $post_max_size
Definition: php.php:11
elgg_echo($message_key, array $args=[], $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21
$php_log
Server PHP info.
Definition: php.php:6
elgg_get_ini_setting_in_bytes($setting)
Returns a PHP INI setting in bytes.
Definition: elgglib.php:1243
$post_max_size_warning
Definition: php.php:14
elgg_format_element($tag_name, array $attributes=[], $text= '', array $options=[])
Format an HTML element.
Definition: output.php:168
elgg echo
Translates a string.
Definition: languages.js:43
$upload_max_filesize
Definition: php.php:12
elgg_view($view, $vars=[], $viewtype= '')
Return a parsed view.
Definition: views.php:246
elgg_get_config($name, $default=null)
Get an Elgg configuration value.