PEAR install weirdness

This morning i wanted to play around with firePHP a bit. And wanted to install the PEAR package. When i found out i didn’t have PEAR running on my local (win32 xp) box. So off to the pear install. The first thing i notice was that PEAR now is packaged as a nice PHAR file (PHP 5.2.6) . So i hoped the install process would be smoother then normally. This was not the case. First thing i did was run the go-pear.bat file. Which resulted in an error.

phar “[path]go-pear.phar” does not have a signature
Warning: require_once(phar://go-pear.phar/index.php): failed to open stream: pha
r “[path]go-pear.phar” does not have a signature in [path]\PEAR\go-pear.phar on line 1236

Fatal error: require_once(): Failed opening required ‘phar://go-pear.phar/index.
php’ (include_path=’.;[path][path]\PEAR’) in [path]\PEAR\go-pear.phar on line 1236

Ok. So that didn’t work out like i wanted. I checked the go-pear.bat file. And copied the command to windows command line. This resulted in the same error. So i thought. Let’s try this from the PEAR directory. cd PEAR and let’s try that again.

php.exe -d phar.require_hash=0 go-pear.phar

Now the PEAR install runs fine.

For more information about PEAR, see:

http://pear.php.net/faq.php

http://pear.php.net/manual/

Thanks for using go-pear!

Update *

Although this solution seems to have resolved the problem for me. Cal Evans has a good post how to resolve this issue as well. My workaround didn’t solve the problem for Cal but his did for me. So here’s the link

12 Responses to 'PEAR install weirdness'

Subscribe to comments with RSS or TrackBack to 'PEAR install weirdness'.

  1. [...] some quick googeling around found me this possible solution from Thijs Lensselink. I tried it, nope, would not work. However, it did lead me down the correct [...]

  2. [...] some quick googeling around found me this possible solution from Thijs Lensselink. I tried it, nope, would not work. However, it did lead me down the correct [...]

  3. [...] decision on the platform (XAMPP), version of PHP to use and some googling around that lead him to this and this to help resolve his problem. It turns out that, if that’s on, for security [...]

  4. [...] – decision on the platform (XAMPP), version of PHP to use and some googling around that lead him to this and this to help resolve his problem. It turns out that, if that’s on, for security [...]

  5. It worked for me. I had to add the php folder to the windows path first.

    Thanks!

    juanito

    29 Dec 09 at 15:38

  6. I will add your blog to my RSS Feed! Thx.

    Gorden

    9 Apr 10 at 20:43

  7. [...] thanks goes to Thijs Lensselink for helping me solve this problem. This entry was posted in Programming and tagged PEAR, PHPUnit, [...]

  8. Wow! Thanks so much. I struggled with this for hours, but no matter what method I used, something always went wrong. (The link to this post was at the PEAR site.)

    usagi-chan

    1 Dec 10 at 21:16

  9. [...] http://pear.php.net/manual/en/installation.checking.php http://lenss.nl/2008/07/pear-install-weirdness/ Recommend on Facebook Tweet about it Маркирано като PHP Оставете [...]

  10. I was using wamp server and had this issue your solution didnt work however my setup is not a proper apache install etc..

    anyway i got rounf this by moving the the go-pear.phar script from its location and placed it into the php5.3.0 folder and it worked.

    from :: C:\wamp\bin\php\php5.3.0\PEAR

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

    now just need to work out this
    Below is a suggested file layout for your new PEAR installation. To
    change individual locations, type the number in front of the
    directory. Type ‘all’ to change all of them or simply press Enter to
    accept these locations. – wtf just install ahh

    oliver dalton

    11 Feb 11 at 17:17

  11. All you need to do is add your PHP directory to your PATH environment variable. The install script assumes that you have already done this. If you’re using WAMP, you would add the following to your PATH:
    C:\wamp\bin\php

    Ben Rupe

    9 Mar 11 at 07:30

  12. Thanks friend! It worked like a charm. Why does it work? Is there a way to make the hash check work instead of disabling it? I am not as good on the command line as I wish, but I am learning Cygwin in an attempt to improve my skills. I wish there was a way to do this from there, as bash is way better than the dosshell imho. In any event I’ll say it again, thanks! I bow to your kung-fu.

    SinthiaV

    13 Sep 11 at 17:04

Leave a Reply

 
Stop ACTA