Posts Tagged ‘pear’

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.

PEAR in cPanel

Monday, July 6th, 2009

In order to configure PEAR with cPanel you need to follow these steps:

1. In the WHM you need to be sure that you have configured Apache with PEAR.
2. If PEAR is not active in Apache go to easyApache and in Exhaustive List of Modules, check “PEAR” and compile Apache again.
3. Now, every normal user in cPanel will have the option to select the packages they want from their cPanel -> Software/Services -> PHP PEAR Packages.
4. (Additional) If an user doesn’t have the option at Step 3, be sure that in WHM -> Software -> Module Installers -> you have installed PEAR.
5. (Additional) If you get the following error:

PEAR configuration files "/.pearrc", "/usr/etc/pear.conf" does not exist

copy pear.conf from /etc/pear.conf -> /usr/etc/pear.conf