PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Wednesday, August 31, 2022

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

 August 31, 2022     pear, php     No comments   

Issue

I am trying to install PEAR for use with 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. 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

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

I'm not sure why I am receiving this error. I just installed the new Wampserver recently.


Solution

Maybe this is what you are looking for.

Here are the steps:

1) Locate the "php.ini" file. In my case, I found it at this path:

C:\wamp\bin\php\php5.3.0\php.ini

Don't use the WAMP system tray icon to edit this file. It didn't work when I tried - you have to manually locate it.

2) Find the following line, in bold:

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

;phar.require_hash = On

3) Uncomment the ";phar.require_hash = On" line by removing the semi-colon.

4) Change "On" to "Off".

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

phar.require_hash = Off

5) Save the file.

After I performed those steps, "go-pear.bat" began working normally again.



Answered By - Graviton
Answer Checked By - Terry (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing