English 中文(简体)
也许没有把我的“营地”走进来。 批次
原标题:Can t seem to set my php.exe path in pear.bat

I installed PEAR and when I try to run it, I receive this message:

PHP_PEAR_PHP_BIN is not set correctly. Please fix it using your environment variable or modify the default value in pear.bat The current value is: .php.exe

在Pear.bat档案中,错误信息产生于:

:PEAR_PHPBIN_ERROR
ECHO PHP_PEAR_PHP_BIN is not set correctly.
ECHO Please fix it using your environment variable or modify
ECHO the default value in pear.bat
ECHO The current value is:
ECHO %PHP_PEAR_PHP_BIN%
GOTO END

在档案顶端有这样的条件:

IF "%PHP_PEAR_PHP_BIN%"=="" SET "PHP_PEAR_PHP_BIN=.php.exe"

这是我的出发点。 我已经改变了这条道路:

IF "%PHP_PEAR_PHP_BIN%"=="" SET "PHP_PEAR_PHP_BIN=C:hqpxamppphpphp.exe"

无论变化如何,我还是从指挥线上都发现了同样的错误,因为它仍然认为价值是.php.exe。 我可以夸大错误信息,我的 t子将出现在指挥线上,因此我相信这一耳光。 正在查阅批号。

So my assumption is, based on that condition, "%PHP_PEAR_PHP_BIN%"!="" and if that is the case, where is it being set so I can override it to my correct path? Ideas where I should look or how to troubleshoot this further?

Here s my pear.bat source code: http://codetidy.com/919/ Thanks!

最佳回答

我得以消除以下条件,从而推翻了这条道路:

替换

IF "%PHP_PEAR_PHP_BIN%"=="" SET "PHP_PEAR_PHP_BIN=C:hqpxamppphpphp.exe"

iii

SET "PHP_PEAR_PHP_BIN=C:hqpxamppphpphp.exe"

虽然这解决了我的问题,但我仍然想知道,这一价值是在这一档案之前确定的。 我确认,在<代码>php_bin上,这条道路是正确的。 当然,在<代码>pear.ini文档中也有价值。

问题回答

For Windows, must SET "PHP_PEAR_PHP_BIN" under user environment variable to path to php.exe. Like me, I set it to "C:wampinphpphp5.3.0php.exe". This will solve your problem.

对窗户的加权将环境变数定为

Go to System>Advanced System Settings.

然后将环境变量确定为环境变量

PHP_PEAR_PHP_BIN
c:wampinphpphp5.3.13php.exe

Save Run cmd and type pear on command prompt.

您应在窗户环境变数下找到该变量。 我也面临同样的问题,然后改变了用户变量的价值,并发挥了作用。

http://pear.php.net/manual/en/installation.eck.php” rel=“nofollow”http://pear.php.net/manual/en/installation.eck.php 接受核查的途径包括:进入指挥线的营地——尼。 我在这样做时注意到,“组合文件”(php.ini)之路:被定在 c:窗户(这是寡妇xp机器)我认为这是奇怪的,因为那是为了看看档案中的内容。 没有任何php.ini档案,但有一个耳光。 在档案中,我决定对此进行调查。 它必须沿用,其次与我找到的道路一样。 文档为:7:“php_bin”;s:9:php.exe,接近线末,即改为:7:“php_bin”;9:“C:php.exe”,所有内容都是好的。

Just thought i would update this as i dont like to change batch files that should not need to be changed.

change the ./php.exe to the actual path eg c:xamppphpphp. thanks

一种简单的解决方案,不使用Windows的环境变量。

你可以在首次安装Pear后查阅PEAR_ENV.reg文档。 这份档案应当放在你的PHP中。 在本档案中,你将发现以下线:

"PHP_PEAR_PHP_BIN"=".\php.exe"

纽约总部

"PHP_PEAR_PHP_BIN"="F:\PHP5.2\php.exe"

Change "F:PHP5.2" 纽约总部 whatever where is you PHP installation. You can now double-click on the PEAR_ENV.reg file 纽约总部 setup correctly your environment variable.





相关问题
Brute-force/DoS prevention in PHP [closed]

I am trying to write a script to prevent brute-force login attempts in a website I m building. The logic goes something like this: User sends login information. Check if username and password is ...

please can anyone check this while loop and if condition

<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...

定值美元

如何确认来自正确来源的数字。

Generating a drop down list of timezones with PHP

Most sites need some way to show the dates on the site in the users preferred timezone. Below are two lists that I found and then one method using the built in PHP DateTime class in PHP 5. I need ...

Text as watermarking in PHP

I want to create text as a watermark for an image. the water mark should have the following properties front: Impact color: white opacity: 31% Font style: regular, bold Bevel and Emboss size: 30 ...

How does php cast boolean variables?

How does php cast boolean variables? I was trying to save a boolean value to an array: $result["Users"]["is_login"] = true; but when I use debug the is_login value is blank. and when I do ...

热门标签