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 sudo pear channel-discover...
Install and configure MongoDB and PHP driver with MacPorts
Installing and configuring MongoDB with MacPorts Installing MongoDB with MacPorts is as easy as...
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...
Using MacPorts php from command line
Some time ago I had installed Apache+MySQL using MacPorts in Mac OS X. It was all OK as long as I used...
Leave a comment ?

0 Comments.

Leave a Comment