[Solved] Advanced Ping ss_fping.php on Cacti 1.0

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
cjolly3053
Posts: 48
Joined: Thu Jan 06, 2011 9:30 am
Location: Nashville, TN
Contact:

[Solved] Advanced Ping ss_fping.php on Cacti 1.0

Post by cjolly3053 »

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:
error1.JPG
error1.JPG (47.8 KiB) Viewed 2914 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.
cigamit
Developer
Posts: 3369
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Re: Advanced Ping ss_fping.php on Cacti 1.0

Post by cigamit »

http://php.net/manual/en/function.split.php

Split is deprecated in newer PHP versions.
cjolly3053
Posts: 48
Joined: Thu Jan 06, 2011 9:30 am
Location: Nashville, TN
Contact:

Re: Advanced Ping ss_fping.php on Cacti 1.0

Post by cjolly3053 »

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.
hamedghorbani
Posts: 7
Joined: Mon Mar 11, 2019 12:55 am

Re: Advanced Ping ss_fping.php on Cacti 1.0

Post by hamedghorbani »

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.
netniV
Cacti Guru User
Posts: 3441
Joined: Sun Aug 27, 2017 12:05 am

Re: [Solved] Advanced Ping ss_fping.php on Cacti 1.0

Post by netniV »

I think preg_split expects the string to have a proper regular expression so make sure you have the expression prefix and suffix.
Cacti Developer & Release Manager
The Cacti Group

Director
BV IT Solutions Ltd

+--------------------------------------------------------------------------+

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

Who is online

Users browsing this forum: No registered users and 8 guests