简体   繁体   English

为什么我在安装PEAR时收到错误?

[英]Why am I receiving an error when installing PEAR?

I am trying to install PEAR for use with PHP. 我正在尝试安装PEAR以用于PHP。 As i read on the installation instructions at http://pear.php.net/manual/en/installation.getting.php , I am supposed to run the file go-pear.bat which I have in my C:\\wamp\\bin\\php\\php5.3.0 directory. 当我阅读http://pear.php.net/manual/en/installation.getting.php上的安装说明时,我应该运行go-pear.bat文件,我在C:\\ wamp \\中bin \\ php \\ php5.3.0目录。 According to all the installation guides I have read, it should install and ask me a series of installation questions, but I am receiving the following error: 根据我读过的所有安装指南,它应该安装并问我一系列安装问题,但是我收到以下错误:

phar "C:\\wamp\\bin\\php\\php5.3.0\\PEAR\\go-pear.phar" does not have a signature PHP Warning: require_once(phar://go-pear.par/index.php): failed to open stream: phar error: invalid url or non-existent phar "phar://go-pear.phar/index.php" in C:\\wamp\\bin\\php\\php5.3.0\\PEAR\\go-pear.phar on line 1236 phar“C:\\ wamp \\ bin \\ php \\ php5.3.0 \\ PEAR \\ go-pear.phar”没有签名PHP警告:require_once(phar://go-pear.par/index.php):未能开放流:phar错误:C:\\ wamp \\ bin \\ php \\ php5.3.0 \\ PEAR \\ go-pear.phar中的无效url或不存在的phar“phar://go-pear.phar/index.php”第1236行

Warning: require_once(phar://go-pear.par/index.php): failed to open stream: phar error: invalid url or non-existent phar "phar://go-pear.phar/index.php" in C:\\wamp\\bin\\php\\php5.3.0\\PEAR\\go-pear.phar on line 1236 Press any key to continue... 警告:require_once(phar://go-pear.par/index.php):无法打开流:phar错误:无效的url或不存在的phar“phar://go-pear.phar/index.php”in第1236行的C:\\ wamp \\ bin \\ php \\ php5.3.0 \\ PEAR \\ go-pear.phar按任意键继续...

I'm not sure why I am receiving this error. 我不知道为什么我收到这个错误。 I just installed the new Wampserver recently. 我刚刚安装了新的Wampserver。

Maybe this is what you are looking for. 也许这就是你要找的东西。

Here are the steps: 以下是步骤:

1) Locate the "php.ini" file. 1)找到“php.ini”文件。 In my case, I found it at this path: 就我而言,我发现它在这条道路上:

C:\\wamp\\bin\\php\\php5.3.0\\php.ini C:\\ WAMP \\ BIN \\ PHP \\ php5.3.0 \\ php.ini中

Don't use the WAMP system tray icon to edit this file. 请勿使用WAMP系统托盘图标编辑此文件。 It didn't work when I tried - you have to manually locate it. 当我尝试时它不起作用 - 你必须手动找到它。

2) Find the following line, in bold: 2)以粗体显示以下行:

; ; http://php.net/phar.require-hash;phar.require_hash = On ; http://php.net/phar.require-hash;phar.require_hash = On; http://php.net/phar.require-hash http://php.net/phar.require-hash

;phar.require_hash = On ; phar.require_hash =开

3) Uncomment the ";phar.require_hash = On" line by removing the semi-colon. 3)通过删除分号取消注释“; phar.require_hash = On”行。

4) Change "On" to "Off". 4)将“开”改为“关”。

; ; http://php.net/phar.require-hash http://php.net/phar.require-hash

phar.require_hash = Off phar.require_hash =关闭

5) Save the file. 5)保存文件。

After I performed those steps, "go-pear.bat" began working normally again. 在我执行这些步骤后,“go-pear.bat”再次开始正常工作。

您应该能够在不使用以下内容编辑php.ini的情况下启动它:

PATH/TO/php.exe -d phar.require_hash=0 PATH/TO/go-pear.phar

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 为什么在新的 Laravel 安装上安装 argon 时会收到错误消息? - why am i receiving a error when installing argon on a fresh laravel install? 为什么我收到PDO查询错误? - Why am I receiving a PDO query error? 从联系表单提交数据时,为什么会收到“无法打开流”错误? - Why am I receiving a 'failed to open stream' error when submitting data from a contact form? 为什么在使用AJAX / PHP时会收到未定义索引错误? - Why am I receiving an Undefined Index error when using AJAX/PHP? 为了安装phpunit,在安装pear时如何解决错误? - How to fix error when installing pear in order to install phpunit? PHP:安装 Pear 时出现“致命错误:调用未定义的 function _determineIfPowerpc” - PHP : "Fatal error: Call to undefined function _determineIfPowerpc" when installing Pear 在Mac OS X 10.6.6上安装pear时,PHP语法错误 - PHP syntax error when installing pear on mac OS X 10.6.6 在“pear.phpunit.de/PHPUnit”中安装PHPUnit'未知频道“pear.phpunit.de”时出错 - Error when installing PHPUnit 'unknown channel “pear.phpunit.de” in “pear.phpunit.de/PHPUnit”' 我为什么收到HY093错误[PDO] - Why am I receiving HY093 error [PDO] 为什么我的FedEx包裹寄送时没有收到通知? - Why am I Not receiving a notification when my FedEx package is delivered?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM