One of the best tools I use for local development is MAMP (pro) for OSX, recently I needed to add MDB2 to the local install in order to get my local dev environment working completely for a client.
Until today I’ve been getting an error:
Fatal error: Class 'MDB2' not found in ...
Pear needed some additional packages to connect to the DB.
Here’s what you’ll need to do to install pear packages with MAMP on OSX.
Open the terminal and include the full path to pear on the install.
/Applications/MAMP/bin/php5/bin/pear install [package]
For MDB2 I ran:
/Applications/MAMP/bin/php5/bin/pear install http://download.pear.php.net/package/MDB2-2.5.0b2.tgz
Then
/Applications/MAMP/bin/php5/bin/pear channel-update pear.php.net
Since I’m using MySQL I had to install the driver.
/Applications/MAMP/bin/php5/bin/pear install http://download.pear.php.net/package/MDB2_Driver_mysql-1.5.0b2.tgz
That’s it. Make sure to download the latest packages from pear.php.net.
