在 wampserver 上安装 PEAR

发布于 2024-11-03 05:39:55 字数 292 浏览 1 评论 0原文

在 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(7

迷你仙 2024-11-10 05:39:55

并非所有设置都默认安装它。

但是您可以下载简单的 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!)

浮世清欢 2024-11-10 05:39:55

我自己对梨来说相当陌生,但我对类似问题的回答:
在使用 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.

独孤求败 2024-11-10 05:39:55

您也可以访问 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.

巡山小妖精 2024-11-10 05:39:55

首先在 PATH 系统中导出,如果您的 wamp 系统中有 php 5.4.x,则添加您的文件夹 php、pe:

 PATH=...;C:\wamp\bin\php\php5.4.x;

创建一个新文件夹 pe:

C:\wamp\bin\php\pear\

如果您的 php 版本5.3 或更高版本您可以使用 pyrus.phar

使用pyrus.phar安装pear

php pyrus.phar install pear/PEAR-1.9.4

再次导出PATH

PATH=....;C:\wamp\bin\php\pear;

您可以使用 pear.bat 或 pear。

pear.bat <arguments>

检查:了解更多信息:

Firts export in the PATH system, add you folder with php, p.e. if you have php 5.4.x in your wamp system:

 PATH=...;C:\wamp\bin\php\php5.4.x;

Create a new folder p.e.:

C:\wamp\bin\php\pear\

If your php version is 5.3 or or newer you can use pyrus.phar.

Using pyrus.phar to install pear

php pyrus.phar install pear/PEAR-1.9.4

Export you PATH again:

PATH=....;C:\wamp\bin\php\pear;

you can use pear.bat, or pear.

pear.bat <arguments>

Check: for more information:

第几種人 2024-11-10 05:39:55

这在 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.

荆棘i 2024-11-10 05:39:55

由于多种原因,2023 年接受的答案并未奏效。

  1. https://pear.php.net/go-pear 下载文件并运行进展并不顺利(无论是使用 Web 界面还是 CLI)。
Error -- Deprecated: Function ereg() is deprecated in C:\wamp64\www\dev\pear\index.php on line 1461
  1. 下载了更新版本的 pear 安装程序,但
Error -- manifest cannot be larger than 100 MB in phar "C:\wamp64\www\dev\pear\index.php"

由于某些字符编码问题而遇到了另一个错误。

下面是有效的方法:

  1. 使用 CLI 下载文件 -- cd C:\path\of\choice 例如
cd C:\wamp64\bin\php\php5.6.40
curl -OL http://pear.php.net/go-pear.phar
  1. 下载后,执行它
php -d phar.require_hash=0 go-pear.phar
  1. 按照默认提示操作。

  2. 在安装的最后一步中,确保允许 pear 安装程序编辑 php.ini 以包含 pear 目录
    或者您也可以手动进行。在 php.ini 的底部
    include_path=".;C:\wamp64\bin\php\php5.6.40\pear"
    或搜索“include_path”取消注释(通过删除加引号“;”)并在引号之间进行编辑。

  3. 如果你使用wampserver,这是非常重要的部分
    apache 有一个单独的 php.ini,对我来说它位于 C:\wamp64\bin\apache\apacheX.XX.XX\bin
    您还需要编辑它,并像上面一样放置 include_path

  4. 重新启动所有 wampserver 服务

BOOM!

Following the accepted answer in 2023 did not work for a couple of reasons.

  1. Downloading the file at https://pear.php.net/go-pear and running it didn't go smoothly (either with web interface or CLI).
Error -- Deprecated: Function ereg() is deprecated in C:\wamp64\www\dev\pear\index.php on line 1461
  1. Downloaded a more recent version of the pear installer, and was met another error
Error -- manifest cannot be larger than 100 MB in phar "C:\wamp64\www\dev\pear\index.php"

because of some character encoding issue.

Here's what worked:

  1. Use the CLI to download the file -- cd C:\path\of\choice e.g.
cd C:\wamp64\bin\php\php5.6.40
curl -OL http://pear.php.net/go-pear.phar
  1. Once downloaded, execute it
php -d phar.require_hash=0 go-pear.phar
  1. Follow the default prompts.

  2. 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.

  3. 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

  4. Restart all wampserver services

BOOM!

薄凉少年不暖心 2024-11-10 05:39:55

它对我来说是如何工作的,

我访问了 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文