From af6740d898e63c7737a48cb41b83cf45a0a52ff4 Mon Sep 17 00:00:00 2001 From: Marcus Hill Date: Sun, 30 Jun 2024 12:31:59 +0100 Subject: [PATCH] Debug assistance Clarify Apache/PHP error log location in debug/setup Include app version, cron and timezone in debug page --- admin_debug.php | 14 +++++++++++--- setup.php | 3 ++- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/admin_debug.php b/admin_debug.php index 5c92c6b30..514f880aa 100644 --- a/admin_debug.php +++ b/admin_debug.php @@ -5,7 +5,6 @@ require_once "config.php"; - $folderPath = 'uploads'; function countFilesInDirectory($dir) { @@ -190,7 +189,8 @@ function get_crontab() { $mysqlVersion = $mysqli->server_version; $operatingSystem = php_uname(); $webServer = $_SERVER['SERVER_SOFTWARE']; -$errorLog = ini_get('error_log'); +$errorLog = ini_get('error_log') ?: "Debian/Ubuntu default is usually /var/log/apache2/error.log"; +$updates = fetchUpdates(); ?> @@ -207,7 +207,7 @@ function get_crontab() { echo "MySQL Version: " . $mysqlVersion . "
"; echo "Operating System: " . $operatingSystem . "
"; echo "Web Server: " . $webServer . "
"; - echo "PHP Error Log: " . $errorLog + echo "Apache/PHP Error Log: " . $errorLog ?>
@@ -223,6 +223,14 @@ function get_crontab() { echo "Total size of files in $folderPath and its subdirectories: " . $totalSizeMB . " MB"; ?> +
+

ITFlow app

+ current_version . "
"; + echo "Cron enabled: " . $config_enable_cron . "
"; + echo "App Timezone: " . $config_timezone; + ?> +

Database Structure Check

diff --git a/setup.php b/setup.php index dc78d4fe7..a40658e2b 100644 --- a/setup.php +++ b/setup.php @@ -20,6 +20,7 @@ } include_once "settings_localization_array.php"; +$errorLog = ini_get('error_log') ?: "Debian/Ubuntu default is usually /var/log/apache2/error.log"; // Get a list of all available timezones $timezones = DateTimeZone::listIdentifiers(); @@ -848,7 +849,7 @@

A database must be created before proceeding - click on the button below to get started.