0 && $foundLines <= $lines) { $read = min($chunkSize, $pos); $pos -= $read; fseek($handle, $pos); $buffer = fread($handle, $read) . $buffer; $foundLines = substr_count($buffer, "\n"); } fclose($handle); $rows = explode("\n", rtrim($buffer, "\n")); $rows = array_slice($rows, -$lines); return array_reverse($rows); } function acp_error_log_severity(string $line): string { if (preg_match('/\b(Fatal error|SQL ERROR|Uncaught|Parse error|ZnoteX DB)\b/i', $line)) { return 'red'; } if (preg_match('/\b(Warning|Deprecated)\b/i', $line)) { return 'amber'; } return ''; } $module = 'error_log'; if ($_SERVER['REQUEST_METHOD'] === 'POST') { $do = (string) ($_POST['do'] ?? ''); if ($do === 'save_path') { $newPath = trim((string) ($_POST['path'] ?? '')); if (setting_set('error_log:path', $newPath)) { acp_log('error_log.path_save', $newPath); acp_flash_success(t_default('acp.error_log.saved', 'Log path saved.')); } else { acp_flash_error(t_default('acp.error_log.save_failed', 'The log path could not be saved.')); } } elseif ($do === 'reset_path') { if (setting_set('error_log:path', '')) { acp_log('error_log.path_reset'); acp_flash_success(t_default('acp.error_log.reset', 'Reverted to the auto-detected path.')); } else { acp_flash_error(t_default('acp.error_log.reset_failed', 'The log path could not be reset.')); } } acp_redirect($module); } $path = acp_error_log_path(); $hasFile = $path !== '' && is_file($path) && is_readable($path); $linesWant = in_array((string) ($_GET['lines'] ?? ''), array('100', '300', '1000'), true) ? (int) $_GET['lines'] : 300; $rows = $hasFile ? acp_error_log_tail($path, $linesWant) : array(); $configured = trim((string) setting('error_log:path', '')); ?>
error_log file for this request - it is very likely logging to the web server's own error log instead (e.g. Apache's log under XAMPP, WAMP, Uniform Server, or a Linux host), which lives outside this site's folder and cannot be found automatically.") ?> {path} does not exist or is not readable from PHP.', ['path' => h($path)]) ?> apache/logs/error.log, WAMP: logs/apache_error.log, Uniform Server: its logs folder) or your php.ini's error_log directive.") ?>

ini_get('error_log') for this request:") ?>

· ·