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

4

7

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?

Manganese answered 5/5, 2014 at 12:15 Comment(1)
Added answer for this on same question, [here][1]. [1]: #26816026Middlebrow
B
12

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',
);
Blender answered 27/5, 2014 at 12:23 Comment(2)
It now kind of works but I still have "Preparing installer" which is stuck.Transonic
When I did this it worked. But due to PHP warnings which were pushing away the rest of the notifications it seemed as if it hanged.Metonymy
C
1

I also had this error and found that KevinD's fix didn't work for me, but was able to figure something out based on it. To solve the problem I replaced the line

'Console/Getopt.php'   => 'https://raw.github.com/pear/Console_Getopt/trunk/Console/Getopt.php',

with

'Console/Getopt.php'   => 'https://raw.githubusercontent.com/pear/Console_Getopt/trunk/Console/Getopt.php',

The install completed nearly instantly for me after this change.

Carbonous answered 22/1, 2015 at 3:23 Comment(0)
A
0

Use the .phar file: http://pear.php.net/go-pear.phar

It should work better.

Athos answered 13/5, 2014 at 11:19 Comment(0)
F
0

Pay attenction: Sometimes the problem is caused because of the blocking of fsocket() php function.
Server-to-server communication is sometimes used to commit abuses for example internet attacks.
Many free hosting companies block fsocket() function by default, and sometimes you have to authenticate yourself (providing information about you) to use this function.

Flush answered 30/8, 2015 at 18:57 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.