Posts Tagged ‘ping’

Problem using PEAR ping command

Tuesday, July 7th, 2009

If you use cPanel and you get the following error when calling PING from PEAR:


Warning: popen() has been disabled for security reasons in /usr/lib/php/OS/Guess.php on line 242


Warning: fgets(): supplied argument is not a valid stream resource in /usr/lib/php/OS/Guess.php on line 243


Warning: pclose(): supplied argument is not a valid stream resource in /usr/lib/php/OS/Guess.php on line 252


Warning: exec() has been disabled for security reasons in /home/dev7sof/php/Net/Ping.php on line 243 unable to locate the ping binary

then in WHM -> PHP Configuration -> Switch to Advanced Mode -> remove from disable_functions the functions exec and popen

and save the new configuration.

Ping not working in cPanel

Tuesday, July 7th, 2009

If you try to run ‘ping’ as unprivileged user and you get the following message:

#ping www.google.com
ping: icmp open socket: Operation not permitted

then as root, run the following command:

#chmod +s ping