The main trick is not to mix pear as is /usr/bin/pear and /usr/local/zend/bin/pear. If you have already installed PHPUnit using the default Mac OS X Pear, do not mix /usr/bin/phpunit and /usr/local/zend/bin/phpunit.

That confusion out of the way, it seems the pear installed with the zend server is far from up to date. RUpdate it as follow :

# remove the reg file for as its wrong
rm /usr/local/zend/share/pear/.channels/
# remove the .channels as it is obsolete
mv /usr/local/zend/share/pear/.channels /usr/local/zend/share/pear/.channels.old
# now lets get the correct settings
/usr/local/zend/bin/pear channel-update
# update the pear installer
/usr/local/zend/bin/pear upgrade pear

All this done, proceeed with the PHPUnit install

# phpunit moved from pear to there own pear server, so you need to add there channel
/usr/local/zend/bin/pear channel-discover
# now you can add phpunit
/usr/local/zend/bin/pear install -a phpunit/PHPUnit

That’s it! Below are a couple of links to helpful pages.

Filed under: PHP

Tagged with: , , , ,

Liked this page?

Tweet it

Subscribe to the RSS feed or sign up for the newsletter now.

Posts related to Installing PHP Unit on Mac OS X running Zend Server CE

2 Comments to "Installing PHP Unit on Mac OS X running Zend Server CE"

  1. Comment by Bill Chmura on December 15, 2009 at 5:16 am Reply

    Helpful writeup! One note, with at least my install of OSX and Zend Server CE, I needed to run

    . /etc/zce.rc

    To include the zend libraries… See

    On the channel discover I would get

    dyld: NSLinkModule() error
    dyld: Library not loaded: /scratch/plebld/208/rdbms/lib/libclntsh.dylib.10.1
    Referenced from: /usr/local/zend/lib/php_extensions/
    Reason: image not found
    Trace/BPT trap

    the zce.rc fixed it.

  2. Comment by shalfon on December 15, 2009 at 11:08 am Reply

    Thanks for sharing the extra information, glad this write up helped you out.

Name (required)

Email (required)


Leave a Reply

  • About Me

    photo of Samantha Halfon Samantha Halfon
    Software Engineer
    blueKiwi software
    Paris, France
    I enjoy playing with my computer(s), listening to Bob Dylan (and related artists) and watching movies (especially if they were directed by Martin Scorsese or John Cassavetes). Sometimes, I play a little guitar... If not doing any of the above, I am either riding a small red bike around Paris, or, making videos. About my videomaking please check out World Wide Angle and its blog.