Update #2: the latest go-pear.phar works in PHP 5.1b3 now. We're up to 814k. It still doesn't work on linux, no idea why.
Update: a new go-pear.phar is available containing fixes for some of the problems noted in the comments below. If you've had trouble, give it a try, it may work now.
The beginning of a new era in PEAR has arrived. I have just uploaded the first ever self-contained single file installation of PEAR, based on PHP_Archive. Unlike the pre-existing http://go-pear.org, go-pear.phar (a 768k draft is available at http://pear.chiaraquartet.net/go-pear.phar) provides a simple method for those with limited internet access or finicky firewall/proxy issues to download and install PEAR with tremendous ease. In addition, earlier problems with versioning have been eliminated as all packages are bundled directly inside go-pear.phar itself.
go-pear.phar REQUIRES PHP 4.3.0 or newer, so don't even try it with PHP 4.2.x or older. You've been warned.
Other improvements include:
- Understanding of the differences between a system-wide installation and a local PEAR installation is built into the install process.
- The location of the PEAR configuration file (pear.ini/pear.conf) is now explicit and configurable.
- The default name of the configuration file matches that expected by the PEAR_Config class
- PEAR 1.4.0 is used for all installation tasks, and the code is contained directly within go-pear.phar - no external code is needed or used, even if available, providing simpler debugging.
- The go-pear script has been vastly simplified by entirely eliminating download/bootstrap code that was necessary before.
- The spaghetti-code nature of a single-file script has been eliminated - all code can be debugged and designed in the traditional multi-file method prior to pharring.
There are a few issues to know about. First and foremost, I am on the road, meaning I do not have access to a unix-based box on which to test the code. There are slight but important differences that may have minor typos or major logic errors in them that my eyeball debug missed. Second, I have not yet converted the web install of go-pear over to the .phar format. This will happen later once I'm satisfied the CLI version is stable.
In my tests on windows, it works fabulously, so I hope other brave souls will have the same experience. To use, download, and simply run:
$ php go-pear.phar
Then, follow the prompts and answer questions. That's it!