使用wampserver安装PEAR

时间:2013-10-24 21:40:33

标签: php wamp pear

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

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

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

是什么给出了?

3 个答案:

答案 0 :(得分:2)

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

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键

就像那个一样简单

答案 1 :(得分:1)

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

答案 2 :(得分:0)

运行local后输入php go-pear.phar

然后选择Pedro Lobito所说的话。

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

相关问题