Bug 10693 - Squid-accounting: last month of year leads to error (no data shown in webinterface)
Summary: Squid-accounting: last month of year leads to error (no data shown in webinte...
Status: CLOSED FIXED
Alias: None
Product: IPFire
Classification: Unclassified
Component: --- (show other bugs)
Version: 2
Hardware: all All
: - Unknown - Minor Usability
Assignee: Alexander Marx
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-02 08:17 UTC by Alexander Marx
Modified: 2017-11-09 10:23 UTC (History)
3 users (show)

See Also:


Attachments
Status-Button (36.36 KB, image/jpeg)
2015-01-02 15:22 UTC, Tobias Klein
Details
No-Graph (48.23 KB, image/jpeg)
2015-01-02 15:22 UTC, Tobias Klein
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Marx 2014-12-02 08:17:43 UTC
Last month of year leads to an error in a function which should return the first timestamp of actual month and last timestamp of actual month.
Comment 1 Alexander Marx 2014-12-02 08:41:51 UTC
http://git.ipfire.org/?p=people/amarx/ipfire-2.x.git;a=commit;h=ddfc0693e99bbc241f4e054ddcba85f0068596fd

Fixes this error. Please review and commit
Comment 2 Michael Tremer 2014-12-02 16:52:57 UTC
Merged that into next
Comment 3 Tobias Klein 2014-12-16 00:36:11 UTC
Yes, it solves the problem.
Tried on my system.
Comment 4 Tobias Klein 2015-01-01 14:13:32 UTC
The problem is not finally solved.

All bills that has been created & sent were empty.
When you go to the host overview and choice 12/2014 and klick on the monitor button behind the host, no graph is shown.
Comment 5 Tobias Klein 2015-01-01 14:23:47 UTC
Error message in webserver log:
Can't call method "png" on an undefined value at /srv/web/ipfire/cgi-bin/accounting.cgi line 952., referer: https://192.168.1.1:444/cgi-bin/accounting.cgi
Comment 6 Alexander Marx 2015-01-02 07:52:29 UTC
http://git.ipfire.org/?p=people/amarx/ipfire-2.x.git;a=commit;h=003b3f6de39381d1e5263f211d0aab2817c9b729

The bills are indeed empty, because there was no data collected until the first patch is applied.

second part:
On the pdf bill, the month was "00" instead of "12".

This is fixed with this patch.
Comment 7 Michael Tremer 2015-01-02 10:28:01 UTC
Merged that into master as this looks rather urgent... Please don't forget to confirm that the fix works.
Comment 8 Tobias Klein 2015-01-02 15:22:09 UTC
Created attachment 244 [details]
Status-Button
Comment 9 Tobias Klein 2015-01-02 15:22:32 UTC
Created attachment 245 [details]
No-Graph
Comment 10 Tobias Klein 2015-01-02 15:25:49 UTC
The pdf bills are not empty anymore.
But when you click on the status button in the host overview the graph is not shown and the webserver reports "Can't call method "png" on an undefined value at /srv/web/ipfire/cgi-bin/accounting.cgi line 952., referer: https://192.168.1.1:444/cgi-bin/accounting.cgi"

Take a look at my pictures that I attached.
Comment 11 Peter Müller 2017-11-08 17:48:10 UTC
Is this bug still up to date? (Currently cleaning up the bug list... :-) )
Comment 12 Tobias Klein 2017-11-09 10:23:18 UTC
No the problem is solved.