douju2014 2018-03-07 11:30
浏览 139
已采纳

Windows 10上的PHP 7.2上的PEAR

On a clean Windows installation I installed PHP 7.2 with Nginx which works fine, both via Nginx as on the commandline. Now, I also want to install PEAR but that will output som PHP errors which don't fully know why the happen.

Bellow the full output of the command php .\go-pear.phar which I got from the official documentation page http://pear.php.net/manual/en/installation.getting.php.

Name of configuration file [C:\WINDOWS\pear.ini] : $prefix

Below is a suggested file layout for your new PEAR installation.  To
change individual locations, type the number in front of the
directory.  Type 'all' to change all of them or simply press Enter to
accept these locations.

 1. Installation base ($prefix)                   : C:\tools\php
 2. Temporary directory for processing            : C:\tools\php\tmp
 3. Temporary directory for downloads             : C:\tools\php\tmp
 4. Binaries directory                            : C:\tools\php
 5. PHP code directory ($php_dir)                 : C:\tools\php\pear
 6. Documentation directory                       : C:\tools\php\docs
 7. Data directory                                : C:\tools\php\data
 8. User-modifiable configuration files directory : C:\tools\php\cfg
 9. Public Web Files directory                    : C:\tools\php\www
10. System manual pages directory                 : C:\tools\php\man
11. Tests directory                               : C:\tools\php\tests
12. Name of configuration file                    : C:\tools\php
13. Path to CLI php.exe                           : C:\tools\php

1-13, 'all' or Enter to continue:
Beginning install...
PHP Fatal error:  Uncaught Error: Call to undefined method PEAR_Error::set() in phar://C:/tools/php/go-pear.phar/PEAR/Start.php:322
Stack trace:
#0 phar://C:/tools/php/go-pear.phar/PEAR/Start/CLI.php(72): PEAR_Start->doInstall()
#1 phar://C:/tools/php/go-pear.phar/index.php(5): PEAR_Start_CLI->run()
#2 C:\tools\php\go-pear.phar(1271): require_once('phar://C:/tools...')
#3 {main}
  thrown in phar://C:/tools/php/go-pear.phar/PEAR/Start.php on line 322

Fatal error: Uncaught Error: Call to undefined method PEAR_Error::set() in phar://C:/tools/php/go-pear.phar/PEAR/Start.php:322
Stack trace:
#0 phar://C:/tools/php/go-pear.phar/PEAR/Start/CLI.php(72): PEAR_Start->doInstall()
#1 phar://C:/tools/php/go-pear.phar/index.php(5): PEAR_Start_CLI->run()
#2 C:\tools\php\go-pear.phar(1271): require_once('phar://C:/tools...')
#3 {main}
  thrown in phar://C:/tools/php/go-pear.phar/PEAR/Start.php on line 322
  • 写回答

1条回答 默认 最新

  • dsgw3315 2018-03-09 08:59
    关注

    The answer is actually on a page of the documentation: https://pear.php.net/manual/en/installation.php

    Windows 7 will not allow the installation script to write to c:\windows\pear.ini. It gives the "Fatal error: Call to undefined method PEAR_Error::set()" error. Change the location of the configuration files (#11) to someplace writable, complete the installation, then copy the contents into c:\windows\pear.ini.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 latex投稿显示click download
  • ¥15 请问读取环境变量文件失败是什么原因?
  • ¥15 在若依框架下实现人脸识别
  • ¥15 网络科学导论,网络控制
  • ¥100 安卓tv程序连接SQLSERVER2008问题
  • ¥15 利用Sentinel-2和Landsat8做一个水库的长时序NDVI的对比,为什么Snetinel-2计算的结果最小值特别小,而Lansat8就很平均
  • ¥15 metadata提取的PDF元数据,如何转换为一个Excel
  • ¥15 关于arduino编程toCharArray()函数的使用
  • ¥100 vc++混合CEF采用CLR方式编译报错
  • ¥15 coze 的插件输入飞书多维表格 app_token 后一直显示错误,如何解决?