Page 482 - Beginning PHP 5.3
P. 482

Part III: Using PHP in Practice
                       You can now run the PEAR package manager by typing

                    ./pear
                 and pressing Return. As with Ubuntu, you should see a list of commands appear.


                  Installing and Testing PEAR with WampServer
              on Windows

                   If you ’ re running WampServer on Windows, you first need to set up the PEAR package manager. To do

                 this, open a Command Prompt (Start   All Programs   Accessories      Command Prompt) and change
                to the WampServer PHP folder  —  for example:
                    cd C:\wamp\bin\php\php5.2.6

                      A PHP 5.3 version of WampServer wasn ’ t available at the time of writing, so all the paths in this
                    section include a   php5.2.6  folder. If your WampServer comes with PHP 5.3, change the path to
                    include   php5.3.x  rather than  php5.2.6 .
                  In that folder, you should have a file called   go - pear.bat . Run this batch file by typing its name and
                pressing Enter:


                    go-pear.bat
                   The batch file will ask you a few questions about configuring PEAR. Usually you can just press Enter
                 to accept the defaults. The batch program then installs and sets up PEAR, displaying messages similar to
                 the following:

                    C:\wamp\bin\php\php5.2.6 > go-pear.bat

                    Are you installing a system-wide PEAR or a local copy?
                    (system|local) [system] :

                    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.

                     1. Installation base ($prefix)                   : C:\wamp\bin\php\php5.2.6
                     2. Temporary directory for processing            : C:\wamp\bin\php\php5.2.6\tmp
                     3. Temporary directory for downloads             : C:\wamp\bin\php\php5.2.6\tmp
                     4. Binaries directory                            : C:\wamp\bin\php\php5.2.6
                     5. PHP code directory ($php_dir)                 : C:\wamp\bin\php\php5.2.6\
                                                                        pear
                     6. Documentation directory                       : C:\wamp\bin\php\php5.2.6\
                                                                        docs








              444





                                                                                                      9/21/09   9:14:48 AM
          c15.indd   444                                                                              9/21/09   9:14:48 AM
          c15.indd   444
   477   478   479   480   481   482   483   484   485   486   487