Installing PEAR for PHP 5.2 on Windows
For windows installations of PHP, PEAR does NOT come installed. Reading through the documentation, it looks like you can just click go-pear batch file in the directory where PHP is installed. However, I have come across errors with this both times I have tried to use it. The method I found successful is to open a windows command prompt and move into the directory where php is installed (that’s assuming you know the change directory command “cd” to move through directories).
Once there, issue “php -r “readfile(’http://pear.php.net/go-pear’);” > go-pear” to grab the latest instructions and save the file to go-pear. Then, issue “php go-pear” to install PEAR on your windows box. It will ask you a series of questions, which should be fairly easy to answer. Finally, it will create a file in your php directory to update your environment variables. Double click on this file to add PEAR to your path, and you can start using it!
January 4th, 2007 at 10:44 am
Found this post on google. I had exactly the same problem (with 5.1.6)
that the batch file setup doesn’t seem to work.
On doing the install from the command line ( I saved http://go-pear.org/ as a file then executed it) all seems to work.
Thanks!
January 29th, 2007 at 3:47 pm
I tried a few different things to try to get it running, cycling through various different error messages. Even after all of that, this technique got it working for me. Thanks!
June 8th, 2008 at 5:42 am
My Installation with PHP 5.2 on WinXP failed and after updating the files ( http://pear.php.net/bugs/bug.php?id=9925 ) it worked.
Thank you