Installing and Updating PEAR
PEAR has become such an important aspect of efficient PHP programming that a stable
release has been included with the distribution since version 4.3.0. Therefore, if you??™re
running this version or later, feel free to jump ahead and review the section ???Updating
Pear.??? If you??™re running PHP version 4.2.X or earlier, in this section you??™ll learn how
to install the PEAR Package Manager on both the Unix and Windows platforms. Because
many readers run Web sites on a shared hosting provider, this section also explains
how to take advantage of PEAR without running the Package Manager.
Installing PEAR
Installing PEAR on both Unix and Windows is a trivial matter, done by executing a
single script. Instructions for both operating systems are provided in the following
two subsections.
314 CHAPTER 11 ?– PEAR
Installing PEAR on Linux
Installing PEAR on a Linux server is a rather simple process, done by retrieving a
script from the http://go-pear.org/ Web site and executing it with the PHP binary.
Open up a terminal and execute the following command:
%>lynx -source http://go-pear.org/ | php
Note that you need to have the Lynx Web browser installed, a rather standard
program on the Unix platform. If you don??™t have it, search the appropriate program
repository for your particular OS distribution; it??™s guaranteed to be there. Alternatively,
you can just use a standard Web browser such as Firefox and navigate to the
preceding URL, save the retrieved page, and execute it using the binary.
Pages:
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389