Skip to content

Commit

Permalink
Debug assistance
Browse files Browse the repository at this point in the history
Clarify Apache/PHP error log location in debug/setup
Include app version, cron and timezone in debug page
  • Loading branch information
wrongecho committed Jun 30, 2024
1 parent cc38c64 commit af6740d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
14 changes: 11 additions & 3 deletions admin_debug.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

require_once "config.php";


$folderPath = 'uploads';

function countFilesInDirectory($dir) {
Expand Down Expand Up @@ -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();

?>

Expand All @@ -207,7 +207,7 @@ function get_crontab() {
echo "MySQL Version: " . $mysqlVersion . "<br>";
echo "Operating System: " . $operatingSystem . "<br>";
echo "Web Server: " . $webServer . "<br>";
echo "PHP Error Log: " . $errorLog
echo "Apache/PHP Error Log: " . $errorLog
?>

<hr>
Expand All @@ -223,6 +223,14 @@ function get_crontab() {
echo "Total size of files in $folderPath and its subdirectories: " . $totalSizeMB . " MB";
?>

<hr>
<h3>ITFlow app</h3>
<?php
echo "App Version: " . $updates->current_version . "<br>";
echo "Cron enabled: " . $config_enable_cron . "<br>";
echo "App Timezone: " . $config_timezone;
?>

<hr>

<h3>Database Structure Check</h3>
Expand Down
3 changes: 2 additions & 1 deletion setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -848,7 +849,7 @@
<ul>
<li>Please take a look over the install <a href="https://docs.itflow.org/installation">docs</a>, if you haven't already</li>
<li>Don't hesitate to reach out on the <a href="https://forum.itflow.org/t/support" target="_blank">forums</a> if you need any assistance</li>
<li><i>Your PHP Error log is at: <?php echo ini_get('error_log') ?></i></li>
<li><i>Apache/PHP Error log: <?php echo $errorLog ?></i></li>
</ul>
<br><p>A database must be created before proceeding - click on the button below to get started.</p>
<br><hr>
Expand Down

0 comments on commit af6740d

Please sign in to comment.