mirror of
https://github.com/friendica/friendica
synced 2024-12-22 23:20:16 +00:00
Merge pull request #2779 from tobiasd/20160913-admin
display current state of PHP logging in admin panel logging informations
This commit is contained in:
commit
8e6f9abedb
2 changed files with 8 additions and 0 deletions
|
@ -1868,6 +1868,12 @@ function admin_page_logs(&$a){
|
|||
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");
|
||||
|
||||
return replace_macros($t, array(
|
||||
|
@ -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,
|
||||
));
|
||||
}
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
|
||||
<h2>{{$phpheader}}</h2>
|
||||
<div>
|
||||
<p>{{$phplogenabled}}<p>
|
||||
<p>{{$phphint}}</p>
|
||||
<pre>{{$phplogcode}}</pre>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue