Install Doctrine2 with PEAR in MacPorts

Run those commands:

sudo /opt/local/bin/pear channel-discover
sudo /opt/local/bin/pear channel-discover
sudo /opt/local/bin/pear install -a
sudo /opt/local/bin/pear install
sudo /opt/local/bin/pear install

Then running doctrine -v should work but /opt/local/lib/php must be in the include_path of your PHP installation. I tried to include it in my /opt/local/etc/php5/php.ini file but didn’t work, so I added this line as the very first line in /opt/local/bin/doctrine.php:

set_include_path(get_include_path() . PATH_SEPARATOR . '/opt/local/lib/php');

Then everything worked fine.


You might also like

Install PHPUnit in Mac OS X with pear
sudo pear channel-discover sudo pear install phpunit/PHPUnit...

Install and configure MongoDB and PHP driver with MacPorts
Installing and configuring MongoDB with MacPortsInstalling MongoDB with MacPorts is as easy as...

Install MongoDB in Ubuntu 12.04 with PHP driver
Install MongoDB:sudo apt-key adv --keyserver hkp:// --recv 7F0CEB10 echo...

Useful Apache 2 and MySQL 5 service aliases for MacPorts
Those are some aliases I use to start, stop and restart Apache 2 and MySQL on my MacPorts installation...

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.