From f85821839b873ba1a03a75dab5b3b30bc27e286c Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Tue, 13 Sep 2016 22:52:21 +0200 Subject: [PATCH 1/2] display current state of PHP logging in admin panel logging informations --- mod/admin.php | 7 +++++++ view/templates/admin_logs.tpl | 1 + 2 files changed, 8 insertions(+) diff --git a/mod/admin.php b/mod/admin.php index 4ae921b04..0749fd186 100644 --- a/mod/admin.php +++ b/mod/admin.php @@ -1867,6 +1867,12 @@ function admin_page_logs(&$a){ LOGGER_DATA => 'Data', LOGGER_ALL => 'All' ); + + if (ini_get('log_errors')) { + $phplogenabled = t('PHP log currently enabled.'); + } else { + $phplogenabled = t('PHP log currently disabled.'); + } $t = get_markup_template("admin_logs.tpl"); @@ -1887,6 +1893,7 @@ function admin_page_logs(&$a){ '$phpheader' => t("PHP logging"), '$phphint' => t("To enable logging of PHP errors and warnings you can add the following to the .htconfig.php file of your installation. The filename set in the 'error_log' line is relative to the friendica top-level directory and must be writeable by the web server. The option '1' for 'log_errors' and 'display_errors' is to enable these options, set to '0' to disable them."), '$phplogcode' => "error_reporting(E_ERROR | E_WARNING | E_PARSE);\nini_set('error_log','php.out');\nini_set('log_errors','1');\nini_set('display_errors', '1');", + '$phplogenabled' => $phplogenabled, )); } diff --git a/view/templates/admin_logs.tpl b/view/templates/admin_logs.tpl index e79c7d7af..0c052e1bb 100644 --- a/view/templates/admin_logs.tpl +++ b/view/templates/admin_logs.tpl @@ -14,6 +14,7 @@

{{$phpheader}}

+

{{$phplogenabled}}

{{$phphint}}

{{$phplogcode}}
From 88285b4cbfccb67b9af27a12dc9300a6ec7d0563 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Wed, 14 Sep 2016 06:45:05 +0200 Subject: [PATCH 2/2] The info is not that important --- view/templates/admin_logs.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/view/templates/admin_logs.tpl b/view/templates/admin_logs.tpl index 0c052e1bb..b2e6357a9 100644 --- a/view/templates/admin_logs.tpl +++ b/view/templates/admin_logs.tpl @@ -14,7 +14,7 @@

{{$phpheader}}

-

{{$phplogenabled}}

+

{{$phplogenabled}}

{{$phphint}}

{{$phplogcode}}