From 08a11cb53e1f9e9cb791e4e832a31928165b950b Mon Sep 17 00:00:00 2001 From: o-psi Date: Fri, 13 Oct 2023 21:56:50 -0500 Subject: [PATCH] added php info and handling to bottom of debug --- settings_debug.php | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/settings_debug.php b/settings_debug.php index 4f298430..0f08d64b 100644 --- a/settings_debug.php +++ b/settings_debug.php @@ -116,6 +116,13 @@ function fetchDatabaseStructureFromServer() { return $tables; } +//function to get current crontab and return it as an array +function get_crontab() { + $crontab = shell_exec('crontab -l'); + $crontab = explode(PHP_EOL, $crontab); + return $crontab; +} + // URL to the SQL dump file $fileURL = "https://raw.githubusercontent.com/itflow-org/itflow/master/db.sql"; @@ -281,6 +288,28 @@ $webServer = $_SERVER['SERVER_SOFTWARE'];
+

PHP Info

+ (.*).*$%ms', '$1', $phpinfo); + + //Remove everything after the body tag + $phpinfo = preg_replace('%^(.*).*$%ms', '$1', $phpinfo); + + //Remove the body tag itself + $phpinfo = preg_replace('%^(.*)$%ms', '$1', $phpinfo); + + //Output the result + echo $phpinfo; + ?> + +