output and check for reasonable values of post_size, memory_limit and upload_file_size

This commit is contained in:
Uwe Steinmann 2026-04-16 14:03:07 +02:00
parent a395bd1030
commit 9ef3f9c8f7

View File

@ -132,7 +132,22 @@ class SeedDMS_View_Info extends SeedDMS_Theme_Style {
echo "<tr><td>PHP</td><td>".phpversion()."</td></tr>\n";
echo "<tr><td>Path to php.ini</td><td>".php_ini_loaded_file()."</td></tr>\n";
echo "<tr><td>Timezone</td><td>".date_default_timezone_get()." (Current date/time on server is ".getLongReadableDate(time()).")</td></tr>\n";
$warnings = [];
$su = SeedDMS_Core_File::parse_filesize(ini_get('upload_max_filesize'));
if ($su <= 5*pow(2, 20))
$warnings[] = 'max_filesize_very_low';
echo "<tr><td>Max upload file size</td><td>".SeedDMS_Core_File::format_filesize($su)."</td></tr>\n";
$sp = SeedDMS_Core_File::parse_filesize(ini_get('post_max_size'));
if ($sp <= $su)
$warnings[] = 'post_max_size_below_max_filesize';
echo "<tr><td>Max post size</td><td>".SeedDMS_Core_File::format_filesize($sp)."</td></tr>\n";
$sm = SeedDMS_Core_File::parse_filesize(ini_get('memory_limit'));
if ($sm <= 128*pow(2, 20))
$warnings[] = 'memory_limit_very_low';
echo "<tr><td>Memory limit</td><td>".SeedDMS_Core_File::format_filesize($sm)."</td></tr>\n";
echo "</tbody>\n</table>\n";
foreach ($warnings as $warning)
echo $this->warningMsg(getMLText($warning));
$this->contentHeading(getMLText("installed_php_extensions"));
$phpextensions = get_loaded_extensions(false);