mirror of
https://github.com/pi-hole/web.git
synced 2026-04-24 02:39:25 +01:00
I have a different service running on FTL default port and so FTL service was not properly started. I searched quite a long time to discover why the Dashboard never loaded and finally found the reason.
This patch counts empty lines and dies properly with a JSON error. This fixed my issue. Also I have pi-hole running with apache2 and so no /var/log/lighttpd/error.log exists. Fix: Try apache2 logging location and if not found then write log to a /tmp file. Signed-off-by: Philipp Kolmann <philipp@kolmann.at>
This commit is contained in:
@@ -10,6 +10,14 @@ require_once('func.php');
|
||||
$ERRORLOG = getenv('PHP_ERROR_LOG');
|
||||
if (empty($ERRORLOG)) {
|
||||
$ERRORLOG = '/var/log/lighttpd/error.log';
|
||||
|
||||
if (!file_exists($ERRORLOG) || !is_writable($ERRORLOG)) {
|
||||
$ERRORLOG = '/var/log/apache2/error.log';
|
||||
|
||||
if (!file_exists($ERRORLOG) || !is_writable($ERRORLOG)) {
|
||||
$ERRORLOG = '/tmp/pi-hole-error.log';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function pi_log($message) {
|
||||
|
||||
Reference in New Issue
Block a user