Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gadget graph_multi_lines.php error php7.4 (solved) [BUG] #363

Open
T100D opened this issue Feb 5, 2024 · 0 comments
Open

Gadget graph_multi_lines.php error php7.4 (solved) [BUG] #363

T100D opened this issue Feb 5, 2024 · 0 comments
Labels

Comments

@T100D
Copy link

T100D commented Feb 5, 2024

We installed a new monitoring server where PHP is upgraded to version PHP 7.4.33 (cli) and run into a error
with the gadget /graph_multi_lines.php

The error in /var/log/httpd/error.log:

PHP Warning:  time() expects exactly 0 parameters, 1 given in /usr/local/nagvis/share/userfiles/gadgets/graph_multi_
lines.php on line 103

we changed the code in graph_multi_lines.php from:

# Precommand -> basic settings for rrdtool
$precommand = 'graph - --disable-rrdtool-tag --imgformat PNG --start '.(time('')-$secondsback).' --end '.time('').' --height '.$height.' --width '.$width.' --title "'.$title.'" --vertical-label "'.$unit.'" --font DEFAULT:9:'.$font.'';

to:

# Precommand -> basic settings for rrdtool
$precommand = 'graph - --disable-rrdtool-tag --imgformat PNG --start '.(time()-$secondsback).' --end '.time().' --height '.$height.' --width '.$width.' --title "'.$title.'" --vertical-label "'.$unit.'" --font DEFAULT:9:'.$font.'';

and the problem was solved and gadget is working as desired.
we tested it on our old environment (PHP 7.1.33 (cli)) and it is working there as well.

@T100D T100D added the bug label Feb 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant