Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Sun Jun 16, 2019 12:39 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: [Solved] Advanced Ping ss_fping.php on Cacti 1.0
PostPosted: Thu Mar 09, 2017 6:23 pm 
Offline

Joined: Thu Jan 06, 2011 9:30 am
Posts: 48
Location: Nashville, TN
Has anybody tried lately or with version 1.0 to get the Advanced Ping (ss_fping.php) working???

I really need to get some better visibility to some devices latency and this looked like a good option but just can't seem to get it to work.

This is the error I get trying to run it manually:

/usr/bin/php /var/www/html/cacti/scripts/ss_fping.php localhost
PHP Fatal error: Uncaught Error: Call to undefined function split() in /var/www/html/cacti/scripts/ss_fping.php:26
Stack trace:
#0 /var/www/html/cacti/scripts/ss_fping.php(20): ss_fping('localhost')
#1 {main}
thrown in /var/www/html/cacti/scripts/ss_fping.php on line 26

Here is what I see in cacti log:
Attachment:
error1.JPG
error1.JPG [ 47.8 KiB | Viewed 1179 times ]

Now I'm sure this could have something to do with the version of php this was created on and the version I am running (7.0) but if anybody has got this working let me know.

Also if anybody know's or a better way to graph the availability / latency of a device I can only ping please let me know.


Last edited by cjolly3053 on Fri Mar 10, 2017 1:44 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Advanced Ping ss_fping.php on Cacti 1.0
PostPosted: Thu Mar 09, 2017 7:23 pm 
Offline
Developer

Joined: Thu Apr 07, 2005 3:29 pm
Posts: 2761
Location: B/CS Texas
http://php.net/manual/en/function.split.php

Split is deprecated in newer PHP versions.

_________________
Report a bug
Download Releases
1.X Compatible Plugins


Top
 Profile  
 
 Post subject: Re: Advanced Ping ss_fping.php on Cacti 1.0
PostPosted: Fri Mar 10, 2017 1:43 pm 
Offline

Joined: Thu Jan 06, 2011 9:30 am
Posts: 48
Location: Nashville, TN
cigamit wrote:
http://php.net/manual/en/function.split.php

Split is deprecated in newer PHP versions.


Well awesome that makes sense.... Any easliy enough that was just simply replaced by explode.

Just changes line 26 and 133 and it worked.

Thank you for identifying that.


Top
 Profile  
 
 Post subject: Re: Advanced Ping ss_fping.php on Cacti 1.0
PostPosted: Mon Mar 11, 2019 11:46 pm 
Offline

Joined: Mon Mar 11, 2019 12:55 am
Posts: 7
cjolly3053 wrote:
cigamit wrote:
http://php.net/manual/en/function.split.php

Split is deprecated in newer PHP versions.


Well awesome that makes sense.... Any easliy enough that was just simply replaced by explode.

Just changes line 26 and 133 and it worked.

Thank you for identifying that.


split function was DEPRECATED in PHP 5.3.0, and REMOVED in PHP 7.0.0.
split() is deprecated as of PHP 5.3.0. preg_split() is the suggested alternative to this function.
Just changes "split" line 26 and 133 to "preg_split" and it worked.


Top
 Profile  
 
 Post subject: Re: [Solved] Advanced Ping ss_fping.php on Cacti 1.0
PostPosted: Tue Mar 12, 2019 4:56 am 
Offline
Cacti Guru User

Joined: Sun Aug 27, 2017 12:05 am
Posts: 2499
I think preg_split expects the string to have a proper regular expression so make sure you have the expression prefix and suffix.

_________________
Official Cacti Developer

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation

My resources:
How to submit Pull Requests
Development Wiki and How To's
Updated NetSNMP Memory template for Cacti 1.x
Cisco SFP template for Cacti 0.8.8


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

All times are UTC - 5 hours


Who is online

Users browsing this forum: Google [Bot] and 4 guests


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