Fatal error: Class 'PEAR' not found in /home/user1/public_html/go-pear.php on line 697

AlexY picture AlexY · May 5, 2014 · Viewed 11.4k times · Source

When trying to install PEAR by running go-pear.php (from the root of a cPanel GoDaddy hosted account), I get the following error:

Starting installation ... Loading zlib: ok

Bootstrapping Installer...................

Bootstrapping PEAR5.php............(remote) ok

Bootstrapping PEAR.php............(remote) ok

Bootstrapping Archive/Tar.php............(remote) ok

Bootstrapping Console/Getopt.php............(remote) ok

Fatal error: Class 'PEAR' not found in /home/alessio1/public_html/go-pear.php on line 697

line 697 is the following: PEAR::setErrorHandling(PEAR_ERROR_DIE, "\n%s\n");

The file go-pear.php was taken directly from http://pear.php.net/go-pear without any modification.

What am I doing wrong?

Answer

KevinD picture KevinD · May 27, 2014

I had the same error, and managed to solve it replacing the links stored in $bootstrap_files to :

$bootstrap_files = array(
    'PEAR5.php'            => 'https://raw.githubusercontent.com/pear/pear-core/master/PEAR5.php',
    'PEAR.php'             => 'https://raw.githubusercontent.com/pear/pear-core/master/PEAR.php',
    'Archive/Tar.php'      => 'https://raw.githubusercontent.com/pear/Archive_Tar/master/Archive/Tar.php',
    'Console/Getopt.php'   => 'https://raw.githubusercontent.com/pear/Console_Getopt/master/Console/Getopt.php',
);