Wamp 2.2 安装 PEAR
我的操作系统是Windows 7。 我的计算机上安装了 WAMP2.2。 然后我尝试安装 PEAR
。 但是,我在 wamp 目录中找不到我的 go-pear.bat
文件。 美好的。我在这里下载:http://pear.php.net/go-pear.phar
并使用该文件进行安装。 我将文件放入
C:/wamp/bin/php/php5.3.8/pear/go-pear.phar
运行命令:php -d phar.require_hash=0 PEAR/go-pear.phar
安装后,我将 pear 的路径包含在 php 和 apache 文件夹中的 php.ini
中。 我还在 Windows $PATH
变量中包含了 C:/wamp/bin/php/php5.3.8/
。 但是当我运行 pear 命令时。它说找不到 pear 命令。 我检查了该文件夹,只找到了一个名为 pear.bat
和 pear.ini
的文件。 我尝试在命令行中再次运行 pear.bat
。它仍然不起作用。 请专家帮忙解决这个问题。
My operating system is Windows 7.
I got my WAMP2.2 install in my computer.
Then I try to install PEAR
.
However, I can not find my go-pear.bat
file in my wamp directory.
Fine. I download in here: http://pear.php.net/go-pear.phar
and install using this file.
I put the file in
C:/wamp/bin/php/php5.3.8/pear/go-pear.phar
Run the command: php -d phar.require_hash=0 PEAR/go-pear.phar
After the installation, I include the path of pear in php.ini
in php and apache folder.
I also include C:/wamp/bin/php/php5.3.8/
in windows $PATH
variable.
But when I run pear command. It said it can not find the pear command.
I check the folder and just find a file called pear.bat
and pear.ini
.
I tried to run pear.bat
again in command line. It still does not work.
Experts, please help on this issue.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
好吧,因为很多人可能会问同样的事情。让我们假设以下情况。
我目前正在运行 2.2 E,其中包括 Apache 2.2.22 – Mysql 5.5.24 – PHP 5.3.13 XDebug 2.1.2 XDC 1.5 PhpMyadmin 3.4.10.1 SQLBuddy 1.3.3 webGrind 1.0
现在,要安装 PEAR,请执行以下操作:
下载此文件:
http://pear.php.net/go-pear.phar
并放在你的WAMP服务器目录下bin 文件夹中的 PHP 版本。
运行命令来安装 PEAR,然后就完成了。
示例(默认,未做任何更改)
使用Windows 的 cd 命令将目录更改为您刚刚下载的 go-pear.phar 文件。就我而言,我将把它指向我自己的目录,所以我这样做了:
cd "C:\wamp\bin\php\php5.3.13"
按 Enter。您应该注意到,现在显示的不是“C:\system\32”而是 C:\wamp\bin\php\php5.3.13
编写以下命令并按 Enter:
php -d phar.require_hash=0 go-pear.phar
选择您是否喜欢本地副本或系统副本。通过输入
system:local
并按 Enter 键,您将安装本地副本。通过输入system
并按 Enter 键,您将安装系统范围的副本。键入
yes
确认所选选项。下一个目录列表将是 PEAR 将安装其组件的引用目录。如果您选择 1 - 12,您可以更改要安装的目录。通过输入
all
并按 Enter 键,您将能够以排队方式更改所有内容。 在我的例子中,我只是按 Enter 并保留所有默认值如果您继续拥有一些列表,请执行以下操作
11. 之后您很可能会收到如下消息:
下面还会出现:
输入
y
并按 Enter这应该会让您在 WAMP 服务器上运行 PEAR :)
Ok since many people may be asking the same thing. Let's suppose the following.
I'm currently running 2.2 E which includes Apache 2.2.22 – Mysql 5.5.24 – PHP 5.3.13 XDebug 2.1.2 XDC 1.5 PhpMyadmin 3.4.10.1 SQLBuddy 1.3.3 webGrind 1.0
Now, to install PEAR do the following:
Download this file:
http://pear.php.net/go-pear.phar
And put it on your WAMP server directory under the PHP version on the bin folder.
Run the command to install PEAR and you're over it.
Example (defaults, no change has been done)
Use Window's cd command to change the directory to the go-pear.phar file you've just downloaded. In my case I'll be pin pointing it to my own directory, so I did it like follows:
cd "C:\wamp\bin\php\php5.3.13"
Press Enter. You should note that instead of saying "C:\system\32" is now displaying C:\wamp\bin\php\php5.3.13
Write the following command and press Enter:
php -d phar.require_hash=0 go-pear.phar
Select whether you like or not a local copy or a system one. By typing
system:local
and pressing enter you'll install a local copy. By typingsystem
and pressing enter you'll install a system-wide copy.Type
yes
to confirm the option chosen.The next list of directories, will be the referring directories that PEAR will install its components. If you select from 1 - 12 you can change the directory you'd like to install. By typing
all
and pressing Enter you'll be able to change them all in a queued manner. In my case, I just pressed Enter and left all defaultsDO THE FOLLOWING IN CASE YOU CONTINUE TO HAVE SOME LISTINGS
11. It is very probable that afterwards you'll receive a message like:
Below it will also appear:
Type
y
and press enterThis should put you running with PEAR on WAMP server :)
pear.bat
是 Windows 上的可执行文件。您必须将该目录放入系统的PATH
变量中才能识别该命令。pear.bat
is the executable on windows. You have to put that directory in your system'sPATH
variable for the command to be recognized.以下提到的所有步骤均基于 GUI 链接 - 易于理解的审查和设置:
点击此处
All the steps mentioned to below link for GUI based - easy understanding review and setup:
Click here
对于任何寻找更新答案的人。在 Windows 10 上,我必须编辑 .bash_profile 以添加以下内容:
For anyone looking for a more current answer. On Windows 10 I had to edit .bash_profile to add the following: