Installing PEAR for PHP 5.2 on Windows
Dec 20th, 2006
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!
Posted In: PHP
Commentary
Hugo Rumens 2007-01-04 18:44:27
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!
Michael Rusch 2007-01-29 23:47:27
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!
Flash Developer 2008-06-08 12:42:12
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