Bug #6083
openSuqid Realtime Monitor / Squid Cache Table not diplaying correctly
0%
Description
On the GUID under Package / Squid / Monitor the realtime tab have all the squid / squidguard logs displayed. The log for "Squid Cache Table" shows the information wrong.
I could find the source of the problem. The file /usr/local/www/squid_monitor_data.php has a line that reads:
// Split line by delimiter
$logline = preg_split("@\|
@",$logent);
Apparently that pattern is not correct for that log file. On my system, a line from that log file looks like this:
"2016-04-06 16:22:56 [65440] loading dbfile /var/db/squidGuard/Black_Listed/domains.db"
That should split each line separating the date form the message, but since that fails, the displayed info is wrong.
I changed the pattern (I'm DO NOT really know how to do it properly) to ""/\[+/"" and now the array split almost correctly.
[0] 2016-04-06 16:22:56
[1] 65440] loading dbfile /var/db/squidGuard/Black_Listed/domains.db
I don't know how to split it correctly tough.