php 在 wampserver 上安装 PEAR
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5796554/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Installing PEAR on wampserver
提问by Keyo
All the guides for installing PEAR on wampserver, such as the Symfony guide, say I am to run a go-pear.bat script within some PEAR directory.
在 wampserver 上安装 PEAR 的所有指南,例如Symfony 指南,都说我要在某个 PEAR 目录中运行 go-pear.bat 脚本。
I am on wampserver 2.1 and there is no PEAR directory and no go-pear batch script to be found.
我在 wampserver 2.1 上,没有 PEAR 目录,也没有找到 go-pear 批处理脚本。
Is this just different because I have a newer version? Is there somewhere I can download these missing installation scripts?
这只是因为我有一个更新的版本而不同吗?有什么地方可以下载这些丢失的安装脚本吗?
采纳答案by mario
It's not installed per default on all setups.
并非所有设置都默认安装它。
But you can download the plain go-pear script for that: http://pear.php.net/go-pear
Either invoke it with php.exe go-pear
or run it through your webserver as regular .php script. (It has a nice installation GUI!)
但是您可以为此下载普通的 go-pear 脚本:http: //pear.php.net/go-pear
要么使用它调用它,要么php.exe go-pear
像常规 .php 脚本一样通过您的网络服务器运行它。(它有一个很好的安装 GUI!)
回答by David 'the bald ginger'
Rather new to pear myself, but my answer to a similar question: Running Wampserver 2.2 on Win7 Professional 64bit working with PHP 5.3.8 I have found a few issues with standard way of installing with go-pear. I downloadedthe go-pear.phar and ran that via cmd with no deprecated errors etc.
我自己对 pear 很陌生,但我对类似问题的回答是:在 Win7 Professional 64 位上运行 Wampserver 2.2,使用 PHP 5.3.8 我发现使用 go-pear 安装的标准方式存在一些问题。我下载了 go-pear.phar 并通过 cmd 运行它,没有过时的错误等。
回答by Toni Leigh
you could also just go to the pear site, download the zips and unzip them in the correct local folders (wamp/bin/php)
你也可以去 pear 站点,下载 zips 并将它们解压缩到正确的本地文件夹 (wamp/bin/php)
we've just solved a similar problem like this, where a copy of a live site set up on a local machine was hitting errors because PEAR was not installed. The installation process was hitting errors so we just downloaded and unzipped PEAR and the required modules directly into the correct directory.
我们刚刚解决了一个类似的问题,在本地机器上设置的活动站点的副本由于未安装 PEAR 而出错。安装过程遇到了错误,所以我们只是将 PEAR 和所需的模块直接下载并解压缩到正确的目录中。
problem solved.
问题解决了。
回答by fitorec
Firts export in the PATH
system, add you folder with php, p.e. if you have php 5.4.xin your wamp system:
首先在PATH
系统中导出,如果您的wamp系统中有php 5.4.x,请添加带有php的文件夹,pe :
PATH=...;C:\wamp\bin\php\php5.4.x;
Create a new folder p.e.:
新建文件夹pe:
C:\wamp\bin\php\pear\
If your php version is 5.3 or or newer you can use pyrus.phar.
如果您的 php 版本是 5.3 或更高版本,您可以使用pyrus.phar。
Using pyrus.phar to install pear
使用 pyrus.phar 安装梨
php pyrus.phar install pear/PEAR-1.9.4
Export you PATH
again:
PATH
再次导出你:
PATH=....;C:\wamp\bin\php\pear;
you can use pear.bat, or pear.
您可以使用 pear.bat 或 pear。
pear.bat <arguments>
Check: for more information:
检查:更多信息:
回答by Peter Drinnan
This worked for me on windows 7:
这在 Windows 7 上对我有用:
http://www.steptoinstall.com/install-pear-wamp-server-windows-7-8.html
http://www.steptoinstall.com/install-pear-wamp-server-windows-7-8.html
NOTE: Make sure you open command prompt window in administration mode.
注意:确保在管理模式下打开命令提示符窗口。
回答by Keyo
I downloaded the 32bit wamp and this includes the pear files. However it is best to install 1.9.2 by downloading go-pear.phar
manually, as the default one didn't seem to work.
我下载了 32 位 wamp,其中包括梨文件。但是最好通过go-pear.phar
手动下载来安装 1.9.2 ,因为默认的似乎不起作用。