使用wampserver安装PEAR


Install PEAR with wampserver

我正在尝试在wampserver中安装pear。它没有带梨.bat。

我从 pear.php.net/go-pear 下载.phar文件并运行php go-pear.phar。

它只是在我设置所有路径的配置上不断循环。

什么给?

假设

您正在运行 PHP5.3.24 并且 wamp 安装在 C: 驱动器上,如果没有,请相应地更改文件夹名称。

从 http://pear.php.net/go-pear.phar 获取go-pear.phar并将其复制到wamp''bin''php''php5.3.24文件夹中

从 Windows 命令窗口执行所有这些操作

cd C:'wamp'bin'php'php5.3.24
md pear
PATH=%PATH%;C:'wamp'bin'php'php5.3.24
php go-pear.phar

当你被问到这个问题时

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)                   : D:'wamp'bin'php'php5.3.24
 2. Temporary directory for processing            : D:'wamp'bin'php'php5.3.24'tmp
 3. Temporary directory for downloads             : D:'wamp'bin'php'php5.3.24'tmp
 4. Binaries directory                            : D:'wamp'bin'php'php5.3.24
 5. PHP code directory ($php_dir)                 : D:'wamp'bin'php'php5.3.24'pear
 6. Documentation directory                       : D:'wamp'bin'php'php5.3.24'docs
 7. Data directory                                : D:'wamp'bin'php'php5.3.24'data
 8. User-modifiable configuration files directory : D:'wamp'bin'php'php5.3.24'cfg
 9. Public Web Files directory                    : D:'wamp'bin'php'php5.3.24'www
10. Tests directory                               : D:'wamp'bin'php'php5.3.24'tests
11. Name of configuration file                    : D:'wamp'bin'php'php5.3.24'pear.ini
12. Path to CLI php.exe                           : 'wamp'bin'php'php5.3.24
1-12, 'all' or Enter to continue: 12

要让它继续安装,您只需按 ENTER 键

就这么简单

我遇到了同样的问题,如果你向后滚动一点,你应该会看到一个错误,可能是你没有正确填写php.exe foldernumber 12)。只需键入 12 ,按 enter 并导航到您的 PHP 安装文件夹(如 C:/php )。然后,点击后 enter ,安装应该开始。

运行

php go-pear.phar 后键入 local

然后按照佩德罗·洛比托说的去做。

如果列表再次显示,只需按Enter,安装应该开始。