Dec
2
Installing PHP Unit on Mac OS X running Zend Server CE
December 2, 2009 | 2 Comments
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 :
1 2 3 4 5 6 7 8 | # remove the reg file for pear.php.net as its wrong rm /usr/local/zend/share/pear/.channels/pear.php.net.reg # 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 pear.php.net # update the pear installer /usr/local/zend/bin/pear upgrade pear |
All this done, proceeed with the PHPUnit install
1 2 3 4 | # phpunit moved from pear to there own pear server, so you need to add there channel /usr/local/zend/bin/pear channel-discover pear.phpunit.de # 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.
- http://akrabat.com/php/some-notes-on-zend-server-ce-for-mac-os-x
- http://wiki.originalwebware.co.uk/ZendServer_phpunit
Comments
2 Comments so far
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 http://forums.zend.com/viewtopic.php?f=8&t=792
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/oci8.so
Reason: image not found
Trace/BPT trap
the zce.rc fixed it.
Thanks for sharing the extra information, glad this write up helped you out.