Re: Installing PEAR Benchmark package

From: Date: Sat, 10 Mar 2007 23:45:22 +0000
Subject: Re: Installing PEAR Benchmark package
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-26808@lists.php.net to get a copy of this message
Hey John, On 3/10/07, John Sutton <waterstone@verizon.net> wrote:
Hello... I am new to PEAR having been introduced to it through Larry Ullman's book 'PHP and MySQL for Dynamic Websites. In this book I am working on a script calling for a PEAR benchmark package and I'm having difficulty installing that package. If it helps Here are some vitals first: My platform is MAC OS X 10.3.9 My PHP version is: 5.1.2 How do I retrieve this package and how do I install it in the correct directory? Here is what my terminal sessions have looked like so far: --------------------------- John-Suttons-Computer:~ john$ John-Suttons-Computer:~ john$ cd /usr/local/php5/lib/php John-Suttons-Computer:/usr/local/php5/lib/php john$ ls
Archive         PEAR            build           pearcmd.php
Console         PEAR.php        data            peclcmd.php
OS              System.php      doc
John-Suttons-Computer:/usr/local/php5/lib/php john$ pear list-all All packages: =============
Package                         Latest    Local
<snip>
XML_XPath                       1.2.3
John-Suttons-Computer:/usr/local/php5/lib/php john$ pear install benchmark downloading Benchmark-1.2.6.tgz ... Starting to download Benchmark-1.2.6.tgz (7,915 bytes) ......done: 7,915 bytes Optional dependencies: 'bcmath' PHP extension is recommended to utilize some features no script destination directory John-Suttons-Computer:/usr/local/php5/lib/php john$ pear list (no packages installed) John-Suttons-Computer:/usr/local/php5/lib/php john$ -----------
Hey John, Mac OS X comes with php and pear by default - so you may have two copies on your system (5 and 4). To be sure, type 'which pear' in your console to find out where pear is located, and 'pear -V' to find out some info about the pear version you're using... and also 'pear config-show' to see the configuration details. My guess is, the pear version you are running is the /usr/bin/pear which is configured for the PHP 4 version distributed with OSX. If this is the case, there are a couple options. If you're using Marc Liyanage's PHP package, you might want to specify '/usr/local/php5/bin/pear install benchmark' (will probably require sudo to install/upgrade packages), and always specify the full path when you run pear & php through the console. Or you could change every path for the OSX provided PEAR using config-set, or, what I do is sudo rm /usr/bin/php /usr/bin/pear and then sudo ln -s /usr/local/php5/bin/php /usr/bin/php && sudo ln -s /usr/local/php5/bin/pear /usr/bin/pear To remove the php4 version and link it to Marc Liyanage's PHP 5 versions. Keep in mind, Apple occasionally updates PHP on OSX, which will revert your /usr/bin/php to their distributed version 4. Hope that helps... good luck! -- -Brett Bieber http:saltybeagle.com aim:ianswerq

« previous php.pear.general (#26808) next »