More info about the error on 30th April:
- at 23:45 UTC, the logs overview (month listing) wasn't visible
- the issue fixed itself at midnight
- in index.php lines 213, 218: is_dir($logdir) would return false as the $logdir var is constructed from $year and $month which are set to:
$month = date('m');
$year = date('Y');
The web server clock is CET, so it'd would be looking for a future, non-existant log dir as the IRC logger writes files according to UTC.
EDIT: A similar issue stops the [Today] button working for a couple of hours each night as CET is a couple of hours ahead of UTC during summer.
I'm not that proficient in PHP, maybe:
- the server base time could be changed to UTC or
- set date.timezone in php.ini to UTC or
- set date_default_timezone_set('UTC') at the top of index.php
+ some sort of offset for line 193 'Current Server Time (Central Europe)' ?
line numbers correspond to this version/hash of index.php:
Created a fork for testing;
- add utcDatTime() function where server time can be offset to return UTC (substitute for date() )
- add logLink() which returns <a class="loglink" ...> for each logfile in the overview mode
- add PHP_EOL in places for cleaner HTML
- ($showoverview) section now reads the actual log dir names rather than trying to construct from the current date. regex tests on dirs and files to exclude any non log files
- changed some var names for readability
Thanks for the fix/patch!
Sorry I had been so busy that I could not test/deploy it yet. I hope to do that soon. (claiming task)
About the clickable URLs:
We on purpose decided against clickable links in the logs to reduce spam/phishing/exploits severity.
Cleaning those malicious URLs from the logs would be extremely time consuming in case a bot or whoever decided to attack us/our channel.