当试图通过运行go-pear.PHP(从cPanel GoDaddy托管帐户的根目录)安装PEAR时,我收到以下错误:
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”);
go-pear.PHP文件是直接从http://pear.php.net/go-pear获取的,没有任何修改.
我究竟做错了什么?
解决方法
我有同样的错误,并设法解决它将$bootstrap_files中存储的链接替换为:
$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',);