I am having trouble installing PEAR, but I really only want to install PHPUnit. Does anyone have experience doing this?
+4
A:
From the PHPUnit installation guide:
Although using the PEAR Installer is the only supported way to install PHPUnit, you can install PHPUnit manually. For manual installation, do the following:
- Download a release archive from http://pear.phpunit.de/get/ and extract it to a directory that is listed in the include_path of your php.ini configuration file.
- Prepare the phpunit script:
- Rename the phpunit.php script to phpunit.
- Replace the @php_bin@ string in it with the path to your PHP command-line interpreter (usually /usr/bin/php).
- Copy it to a directory that is in your path and make it executable (chmod +x phpunit).
- Prepare the PHPUnit/Util/Fileloader.php script:
- Replace the @php_bin@ string in it with the path to your PHP command-line interpreter (usually /usr/bin/php).
Ciaran McNulty
2009-03-10 08:55:58
How can I be sure that my PHP command line interpreter is located at /usr/bin/php?
Andrew
2009-03-10 23:47:02
Also, I've changed my include path multiple times trying to set up pear. What should the default be for Mac OS X 10.5?
Andrew
2009-03-10 23:50:07
`which php` should inform you which binary the system is implicitly using
Erik
2009-08-18 18:30:50
A:
Andrew, I am wrestling with installing PHPUnit at the moment. Found out that it helps a lot if restart your Webserver after updating the include_path in php.ini. Now looking for the exact location of the PHP command line interpreter (that is how I got here). I'll keep you informed.
Sabine
A:
I just installed it today. My steps were as follows:
- download from /get/ - I used 3.3.9.tgz
- extract all files into the pear directory (pear-phpunit, PHPUnit/, etc...)
- change the @php_bin@ to point to my php binary (/usr/bin/php) in the files mentioned above
- create a symlink from pear-phpunit to /usr/local/bin/phpunit (
ln -s /usr/share/php/pear/pear-phpunit /usr/local/bin/phpunit
)
Erik
2009-08-18 18:31:15