X-Git-Url: https://git.p6c8.net/jirafeau.git/blobdiff_plain/9a51f6fc76ce0b60829cc31ccab9643c73b26440..33bb6cfe3111b316082336edae43846aaef84f17:/lib/functions.php diff --git a/lib/functions.php b/lib/functions.php index e72359e..a4f9ec6 100644 --- a/lib/functions.php +++ b/lib/functions.php @@ -843,12 +843,16 @@ function jirafeau_admin_bug_report($cfg) $out .= "- mcrypt version: " . phpversion('mcrypt') . "
"; $php_options = [ 'post_max_size', - 'upload_max_filesize' + 'upload_max_filesize', + 'safe_mode', + 'max_execution_time', + 'max_input_time' ]; foreach ($php_options as &$o) { $v = ini_get($o); $out .= "- $o: " . jirafeau_strval($v) . " (" . gettype($v). ")
"; } + $out .= "- can set_time_limit: " . (set_time_limit(0) ? "yes" : "no") . "
"; $out .= "
"; $out .= "# File permissions
"; @@ -869,10 +873,15 @@ function jirafeau_admin_bug_report($cfg) $out .= "# Browser details
"; $out .= ""; + $out .= "
"; + + $out .= "# Memory
"; + $out .= "- memory_get_peak_usage: " . jirafeau_human_size(memory_get_peak_usage()) . "
"; + $out .= ""; return $out; } @@ -1517,3 +1526,8 @@ function jirafeau_add_ending_slash($path) { return $path . ((substr($path, -1) == '/') ? '' : '/'); } + +function jirafeau_default_web_root() +{ + return $_SERVER['HTTP_HOST'] . str_replace(basename(__FILE__), '', $_SERVER['REQUEST_URI']); +}