Install Doctrine2 with PEAR in MacPorts

Run those commands:

sudo /opt/local/bin/pear channel-discover pear.doctrine-project.org
sudo /opt/local/bin/pear channel-discover pear.symfony.com
sudo /opt/local/bin/pear install -a pear.doctrine-project.org/DoctrineORM-2.3.3
sudo /opt/local/bin/pear install pear.doctrine-project.org/DoctrineSymfonyConsole
sudo /opt/local/bin/pear install pear.doctrine-project.org/DoctrineSymfonyYaml

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.

Ref: http://delboy1978uk.wordpress.com/2012/06/26/installing-doctrine-2-2-2-on-mac-os-x/

You might also like

Install PHPUnit in Mac OS X with pear
sudo pear channel-discover pear.phpunit.de 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://keyserver.ubuntu.com:80 --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.