在窗户上安装梨,错误的路径

时间:2012-11-06 12:36:55

标签: php pear

我正在尝试在Windows 7上安装PEAR。

我在d:\web\soft\php目录中有php 5.4,我也想在这个目录中安装PEAR。我跑:

php go-pear.phar

我看到了这个: enter image description here

这条路对我来说没问题。

然后我运行回车并安装它。最后我看到了这个警告:

  

警告!在D:\ web \ soft \ php找到旧版本,请删除它或确保使用新的d:\ web \ soft \ php \ pear.bat命令   
'pear'命令现在在d:\ web \ soft \ php \ pear.bat`

服务

当我按pear config-show时,我发现与磁盘C:\相关的路径完全错误:

Auto-discover new Channels     auto_discover    <not set>
Default Channel                default_channel  pear.php.net
HTTP Proxy Server Address      http_proxy       <not set>
PEAR server [DEPRECATED]       master_server    pear.php.net
Default Channel Mirror         preferred_mirror pear.php.net
Remote Configuration File      remote_config    <not set>
PEAR executables directory     bin_dir          D:\web\soft\php
PEAR documentation directory   doc_dir          C:\php\pear\docs
PHP extension directory        ext_dir          d:/web/soft/php/ext
PEAR directory                 php_dir          D:\web\soft\php\pear
PEAR Installer cache directory cache_dir        C:\Users\zzz\AppData\Local\Temp\pear\cache
PEAR configuration file        cfg_dir          C:\php\pear\cfg
PEAR data directory            data_dir         C:\php\pear\data
PEAR Installer download        download_dir     C:\Users\zzz\AppData\Local\Temp\pear\download
PHP CLI/CGI binary             php_bin          D:\web\soft\php\php.exe
php.ini location               php_ini          <not set>
PEAR Installer temp directory  temp_dir         C:\Users\zzz\AppData\Local\Temp\pear\temp
PEAR test directory            test_dir         C:\php\pear\tests
PEAR www files directory       www_dir          C:\php\pear\www
Signature Handling Program     sig_bin          c:\gnupg\gpg.exe
Signature Key Directory        sig_keydir       C:\Windows\pearkeys
User Configuration File        Filename         C:\Windows\pear.ini
System Configuration File      Filename         C:\Windows\pearsys.ini

所以它不起作用。

我做错了什么?

3 个答案:

答案 0 :(得分:1)

PHP_PEAR_SYSCONF_DIR设置为pear.ini所在的目录。

SETX PHP_PEAR_SYSCONF_DIR d:\web\soft\php /M

答案 1 :(得分:-2)

尝试查看include_path的参数php.ini

include_path = ".;d:\web\soft\php;d:\web\soft\php\PEAR"

答案 2 :(得分:-2)

这是我到目前为止为php安装pear的最佳链接 http://crc-stc.com/How_to_Install_PHP_PEAR_on_WampServer

相关问题