[英]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.