-
Notifications
You must be signed in to change notification settings - Fork 9
-
Notifications
You must be signed in to change notification settings - Fork 9
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
Wrong mailer() function is used when CACTI_VERSION below 1.2.0 #77
Comments
Download the last fest develop version |
Thanks, this fixed the problem. It's normal that running the command "php /var/www/html/cacti/plugins/reportit/runtime.php -d" as apache user, doesn't update the 'Last run (EST)' time in the view.php page and doing the same via the WUI (reports.php), update it ? |
It should run the same no matter which method is used. If you run that via sudo, you should see what output appears. Also, check the cacti.log and apache error log to see if any errors appear. |
Yes, "Last run (EST)" is updated. I can see the following in CLI, I suppose it's normal. php /var/www/html/cacti/plugins/reportit/runtime.php -d |
Can you run that again with Just curious to see what occurs. |
Here the returning output when executed as apache user in CLI. Also, I've attached the result in txt file to this message (~8MB). |
OK so the problem seems to be that the version detection code is making you use the built in mailer. However, ReportIT needs the 1.2 mailer (which has had a bit of an overhaul to function better). As such, it's passing in arrays which the 1.1.x mailer will not understand. To that end, we added v1_2_0_mailer() as a pure ripped copy to reportit's own libraries so that could be used in place of the 1.1.38 version which doesn't handle things the way that's expect. |
OK, here is where I must have been confused, I tested the cacti version detection code, and it seems to be inverted to what I've coded. I tested four versions against the '1.2.0' string which said that the following signs were true (1):
If you are running 1.1.38, it should have picked the
|
This is now in the main development code, please check and close if issue is resolved. This was not an issue if you were running 1.2.0 beta as that |
Tested with latest dev code and the issue is resolved, thanks. |
Plugin reportit : 1.1.2
Cacti : 1.1.38
I've successfully created a new report and this morning when trying to see the result, I can see in the Cacti log the following. Look like Cacti has automatically disable the plugin !
2018/11/22 00:00:02 - CMDPHP ERRORS DETECTED - DISABLING PLUGIN 'reportit'
2018/11/22 00:00:02 - CMDPHP PHP ERROR Backtrace: (CactiShutdownHandler)(/lib/functions.php: 4628 cacti_debug_backtrace)
2018/11/22 00:00:02 - ERROR PHP ERROR in Plugin 'reportit': Call to undefined function cacti_sizeof() in file: /var/www/html/cacti/plugins/reportit/lib/funct_mailer.php on line: 212
Regards,
The text was updated successfully, but these errors were encountered: