解决pear使用时出现 PHP_PEAR_INSTALL_DIR is not set correctly.
2013-09-10 17:46
591 查看
安装pear越来越麻烦了。。
wamp2.5下pear的安装:
1先到pear.php.net下载 go-pear.phar
2.命令行使用
5.4安装pear,装好后运行pear出现:
PHP_PEAR_INSTALL_DIR is not set correctly.
Please fix it using your environment variable or modify
the default value in pear.bat
The current value is:
D:\wamp\bin\php\php5.2.6\pear
以及
PHP_PEAR_BIN_DIR is not set correctly.
Please fix it using your environment variable or modify
the default value in pear.bat
The current value is:
D:\wamp\bin\php\php5.2.6
等问题,我考虑到原来在php5.2.6的环境里装过pear,现在升级php后安装,可能是由于一些老的信息没有清干净导致的。下面是我的解决步骤:
1.首先,根据提示,编辑pear.bat,用PHP_PEAR_INSTALL_DIR 找到这么一句:
不知道其他人事怎么样的,我这里设置是正常,如果有人有路径不对可以改一下
2.查找 在php.ini里找一下此错误路径D:\wamp\bin\php\php5.2.6修改之(wamp里有两个php.ini)
3.再检查一下电脑自己的环境设置。(我的电脑-属性--高级-环境变量)
4.编辑php文件夹里的PEAR_ENV.reg,看看路径正确与否
按理说,做完以上这些,pear应该没事儿了,不过仍然死活报错,还是诡异的
The current value is:
D:\wamp\bin\php\php5.2.6
重新安装一遍pear仍然如此,
5.最后如下解决:将
其他变量类似。世界清静了。。。
wamp2.5下pear的安装:
1先到pear.php.net下载 go-pear.phar
2.命令行使用
php -d phar.require_hash=0 PEAR/go-pear.phar
来安装pear
win7下由于权限问题,建议使用local安装。一路enter即可
5.4安装pear,装好后运行pear出现:
PHP_PEAR_INSTALL_DIR is not set correctly.
Please fix it using your environment variable or modify
the default value in pear.bat
The current value is:
D:\wamp\bin\php\php5.2.6\pear
以及
PHP_PEAR_BIN_DIR is not set correctly.
Please fix it using your environment variable or modify
the default value in pear.bat
The current value is:
D:\wamp\bin\php\php5.2.6
等问题,我考虑到原来在php5.2.6的环境里装过pear,现在升级php后安装,可能是由于一些老的信息没有清干净导致的。下面是我的解决步骤:
1.首先,根据提示,编辑pear.bat,用PHP_PEAR_INSTALL_DIR 找到这么一句:
IF "%PHP_PEAR_PHP_BIN%"=="" SET "PHP_PEAR_PHP_BIN=D:\wamp\bin\php\php5.4.16\pear"
不知道其他人事怎么样的,我这里设置是正常,如果有人有路径不对可以改一下
2.查找 在php.ini里找一下此错误路径D:\wamp\bin\php\php5.2.6修改之(wamp里有两个php.ini)
3.再检查一下电脑自己的环境设置。(我的电脑-属性--高级-环境变量)
4.编辑php文件夹里的PEAR_ENV.reg,看看路径正确与否
按理说,做完以上这些,pear应该没事儿了,不过仍然死活报错,还是诡异的
The current value is:
D:\wamp\bin\php\php5.2.6
重新安装一遍pear仍然如此,
5.最后如下解决:将
IF "%PHP_PEAR_PHP_BIN%"=="" SET "PHP_PEAR_PHP_BIN=D:\wamp\bin\php\php5.4.16\pear"
直接改为
SET "PHP_PEAR_PHP_BIN=D:\wamp\bin\php\php5.4.16\pear"
其他变量类似。世界清静了。。。
相关文章推荐
- 解决pear使用时出现 PHP_PEAR_INSTALL_DIR is not set correctly.
- [转]Windows中PHP_PEAR_PHP_BIN is not set correctly的解决方法
- php-fpm重启出现 pm.start_servers is not set解决方法
- maven执行install命令出现-Dmaven.multiModuleProjectDirectory system propery is not set. 问题的解决
- 黄聪:VPS服务器如何配置PHP.ini解决wordpress使用WP-Mail-SMTP插件发邮件出现Could not connect to SMTP host的解决办法
- 解决Redhat Linux AS使用yum时出现This system is not registered with RHN的问题(改用CentOS的yum)
- MPI编译C++程序出现#error "SEEK_SET is #defined but must not be for the C++ binding of MPI" 的解决方法
- php 使用 Excel/reader.php, 导入excel到数据库 ,解决The file is not readable。。
- 解决使用maven的java web项目导入后出现的有关问题 -cannot be read or is not a valid ZIP file
- 解决使用maven的java web项目导入或新建添加pom配置后出现的有关问题 -cannot be read or is not a valid ZIP file
- 在配置文件中出现The word 'crud' is not correctly spelled怎么解决
- 使用phpExcelReader操作excel提示The filename *.xls is not readable的详细解决方法
- 运行Tomcat出现the JRE_HOME environment variable is not defined correctly 的解决办法
- svn插件使用出现“the chosen operation is not currently available”解决
- 使用myeclipse开发java,解决java中继承JFrame类出现The type JFrame is not accessible due to restriction的问题
- 解决在win7系统使用Protel 99SE添加库文件时出现“file is not recognized“
- MavenReportException:The environment variable JAVA_HOME is not correctly set.错误异常解决方法
- asp.net连接MYSQL出现Character set 'gbk' is not supported的解决方法
- 启动服务,解决 the BASEDIRenvironmentvariable is not defined correctly
- php -- pecl 安装模块时出现"pear.php.net is using a unsupported protocal - This should never happen. install failed "错误