在 wampserver 上安装 PEAR
在 wampserver 上安装 PEAR 的所有指南,例如 Symfony 指南,都说我要在某个 PEAR 目录中运行 go-pear.bat 脚本。
我使用的是 wampserver 2.1,没有 PEAR 目录,也没有找到 go-pear 批处理脚本。
这只是因为我有新版本而有所不同吗?有什么地方可以下载这些缺少的安装脚本吗?
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.
I am on wampserver 2.1 and there is no PEAR directory and no go-pear batch script to be found.
Is this just different because I have a newer version? Is there somewhere I can download these missing installation scripts?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(7)
并非所有设置都默认安装它。
但是您可以下载简单的 go-pear 脚本: http://pear.php.net/go-梨
使用
php.exe go-pear
调用它,或者通过您的网络服务器作为常规 .php 脚本运行它。 (它有一个很好的安装 GUI!)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!)我自己对梨来说相当陌生,但我对类似问题的回答:
在使用 PHP 5.3.8 的 Win7 Professional 64 位上运行 Wampserver 2.2 我发现使用 go-pear 安装的标准方法存在一些问题。我 下载 go-pear.phar 并通过 cmd 运行它,没有已弃用的错误等
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 downloaded the go-pear.phar and ran that via cmd with no deprecated errors etc.
您也可以访问 pear 站点,下载 zip 并将其解压缩到正确的本地文件夹 (wamp/bin/php)
我们刚刚解决了类似的问题,其中在由于未安装 PEAR,本地计算机出现错误。安装过程遇到错误,因此我们只需下载 PEAR 并将所需模块直接解压到正确的目录中。
问题解决了。
you could also just go to the pear site, download the zips and unzip them in the correct local folders (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.
problem solved.
首先在
PATH
系统中导出,如果您的 wamp 系统中有 php 5.4.x,则添加您的文件夹 php、pe:创建一个新文件夹 pe:
如果您的 php 版本5.3 或更高版本您可以使用 pyrus.phar。
使用pyrus.phar安装pear
再次导出
PATH
:您可以使用 pear.bat 或 pear。
Firts export in the
PATH
system, add you folder with php, p.e. if you have php 5.4.x in your wamp system:Create a new folder p.e.:
If your php version is 5.3 or or newer you can use pyrus.phar.
Using pyrus.phar to install pear
Export you
PATH
again:you can use pear.bat, or pear.
这在 Windows 7 上对我有用:
http://www .steptoinstall.com/install-pear-wamp-server-windows-7-8.html
注意:确保在管理模式下打开命令提示符窗口。
This worked for me on windows 7:
http://www.steptoinstall.com/install-pear-wamp-server-windows-7-8.html
NOTE: Make sure you open command prompt window in administration mode.
由于多种原因,2023 年接受的答案并未奏效。
由于某些字符编码问题而遇到了另一个错误。
下面是有效的方法:
按照默认提示操作。
在安装的最后一步中,确保允许 pear 安装程序编辑 php.ini 以包含 pear 目录
或者您也可以手动进行。在 php.ini 的底部
include_path=".;C:\wamp64\bin\php\php5.6.40\pear"
或搜索“include_path”取消注释(通过删除加引号“;”)并在引号之间进行编辑。
如果你使用wampserver,这是非常重要的部分
apache 有一个单独的 php.ini,对我来说它位于 C:\wamp64\bin\apache\apacheX.XX.XX\bin
您还需要编辑它,并像上面一样放置 include_path
重新启动所有 wampserver 服务
BOOM!
Following the accepted answer in 2023 did not work for a couple of reasons.
because of some character encoding issue.
Here's what worked:
Follow the default prompts.
In the final step of installation make sure to allow the pear installer edit the php.ini to include the pear directory
Or you may do it manually. At the bottom of your php.ini
include_path=".;C:\wamp64\bin\php\php5.6.40\pear"
or search "include_path" uncomment (by removing the sarting ';') and edit in-between the quotes.
Here's the very important part if you use wampserver
apache has a separate php.ini, for me it is located at
C:\wamp64\bin\apache\apacheX.XX.XX\bin
You need to also edit it, and put the include_path like above
Restart all wampserver services
BOOM!
它对我来说是如何工作的,
我访问了 PEAR 官方网站并点击此链接,您将进入 go-pear.phar 源代码。然后我通过右键单击网页保存文件,将其保存在我的 php7.4(这是我在 ENV 变量上设置的 PHP 版本)文件夹下。
接下来以管理员身份打开命令行,CD 到该文件夹并运行以下命令 php go-pear.phar。
这启动了 PEAR 安装过程并询问了几个问题。最后,我被要求双击 php 文件夹内的“PEAR_ENV”reg 文件并完成。
希望这对某人有帮助。
How it worked for me is,
I went to the PEAR official site and clicked on this link which brings you to go-pear.phar source. Then I saved the file by right clicking on the web page, under my php7.4 ( this is the PHP version I have set on my ENV variables ) folder.
Next opened up the command line as admin and did CD to that folder and ran the following command
php go-pear.phar
.This started the PEAR installation process and asked few questions. At the end I was asked to double click on "PEAR_ENV" reg file which was inside the php folder and done.
Hope this will helpful for someone.