Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Sun Dec 16, 2018 1:27 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: Nectar Report ''New Report'' Sent Successfully - NOT
PostPosted: Fri Jul 24, 2015 6:12 am 
Offline

Joined: Fri Jul 24, 2015 6:02 am
Posts: 3
Hello,
Sorry for this being my first post.
Been using Cacti for close to 3 years now but just decided to install the Settings and Nectar plugin with the aim of sending email reports daily.

The Test email is working but sending the report via the "Send Report" link in Nectar is not even though it shows "Nectar Report ''New Report'' Sent Successfully".

I've tried different settings and different email destinations and always end up with the same result; an apparently successfully sent report that doesn't arrive anywhere.

I've took a tcpdump and all looks successful. Let me know what kind of information you'd like to see to help me.

Cacti version: 0.8.8f
Ubuntu 12.04 LTS

Attachment:
Report.jpg
Report.jpg [ 287.48 KiB | Viewed 2943 times ]


Thanks


Top
 Profile  
 
 Post subject: Re: Nectar Report ''New Report'' Sent Successfully - NOT
PostPosted: Fri Jul 24, 2015 10:26 am 
Offline

Joined: Fri Jul 24, 2015 6:02 am
Posts: 3
Looks like the problem is that Cacti is adding the simple quotes in the Nectar Tab.


Top
 Profile  
 
 Post subject: Re: Nectar Report ''New Report'' Sent Successfully - NOT
PostPosted: Mon Jul 27, 2015 7:37 am 
Offline

Joined: Fri Jul 24, 2015 6:02 am
Posts: 3
The issue is indeed cacti adding the single quotes every time the Nectar report is saved. This occurs on Cacti 0.8.8f but not in 0.8.8c


Top
 Profile  
 
 Post subject: Re: Nectar Report ''New Report'' Sent Successfully - NOT
PostPosted: Fri Sep 18, 2015 10:32 am 
Offline

Joined: Fri Apr 24, 2015 11:28 am
Posts: 5
Does anyone have a fix for this, Cacti is adding single quotes around my fields too.

Thanks,


Top
 Profile  
 
 Post subject: Re: Nectar Report ''New Report'' Sent Successfully - NOT
PostPosted: Mon Oct 05, 2015 9:07 am 
Offline

Joined: Mon Oct 05, 2015 8:56 am
Posts: 1
Hello,
I have the same problem, is there a solution to fix it or a way around the problem.

Thank you

cacti 0.8.8f
nectar0.35a


Top
 Profile  
 
 Post subject: Re: Nectar Report ''New Report'' Sent Successfully - NOT
PostPosted: Tue Oct 06, 2015 2:44 am 
Offline

Joined: Tue Oct 06, 2015 2:37 am
Posts: 1
Hi,

In the last version of Cacti, they changed 2 functions :
- sql_sanitize
- sql_save

I guess it did not work out for the plugin nectar...

All you have to do, is to change the file *cacti folder*\lib\database.php by the one in a previous version (0.8.8c).
For me, everything works like a charm.

Someone, point it out : http://forums.cacti.net/viewtopic.php?f=21&t=54909


Top
 Profile  
 
 Post subject: Re: Nectar Report ''New Report'' Sent Successfully - NOT
PostPosted: Wed Nov 18, 2015 9:30 pm 
Offline
Cacti User
User avatar

Joined: Fri Nov 04, 2005 3:37 pm
Posts: 255
Location: Ca US
I think the problem is the way the components (CentOS, php, and mysql) have changed in later revisions.

On my system (CentOS 6.7, php 5.3.3, and mysql 5.1.73), it turns out that the $_POST automatically fixes the outer quotes. So I just removed sql_sanitize() everywhere it occurred. Unfortunately, that broke embedded single quotes (and other characters) that were within a text field (e.g. ' became \' ).

What I discovered turned out to be relatively simple. I just replaced "sql_sanitize()" with "stripslashes()" wherever it occurred. For example, the following line
Code:
$save['name']                   = sql_sanitize(form_input_validate($_POST['name'], 'name', '', false, 3));
became
Code:
$save['name']                   = stripslashes(form_input_validate($_POST['name'], 'name', '', false, 3));
stripslashes is a built-in php function.

_________________
---------
The Glue Guy


Top
 Profile  
 
 Post subject: Re: Nectar Report ''New Report'' Sent Successfully - NOT
PostPosted: Thu Mar 03, 2016 10:29 pm 
Offline

Joined: Thu Mar 03, 2016 10:26 pm
Posts: 2
I tried your solution man. my whole cacti went down. im getting error 500. lol


Top
 Profile  
 
 Post subject: Re: Nectar Report ''New Report'' Sent Successfully - NOT
PostPosted: Tue Nov 07, 2017 5:54 pm 
Offline
Cacti User

Joined: Fri Aug 22, 2014 2:11 pm
Posts: 117
bump... i'm having this issue too.. stupid quotes! :P

anyone with a solution?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group