Hey everyone,
I’m having some issues with the Net_Ping PEAR extension I installed into my remote web server. When I try and execute the script, I get an error saying:
“unable to locate the ping binary”
I’m not 100% what’s going on here. Here is how I am calling the script (which I don’t think is the problem):
require_once "Net/Ping.php";
$ping = Net_Ping::factory();
if (PEAR::isError($ping)) {
echo $ping->getMessage();
} else {
$ping->setArgs(array('count' => 4));
var_dump($ping->ping('google.com'));
}
Any ideas on how to get this working? I’ve googled the error and I came across the cPanel Knowledge Base which states that I need to change the PHP.ini:
WHM -> PHP Configuration -> Switch to Advanced Mode -> remove from disable_functions the functions exec and popen and save the new configuration.
However, it being a remote server I cannot do that. I have other PEAR extensions that work just fine (for instance a port checker). Not sure why this isn’t working.
Any help would be MUCH APPRECIATED!