views:

167

answers:

1

I've installed a copy of MAMP on my macbook so I can run my php/mysql based website locally.

The MAMP package itself seems to work fine but I needed the PEAR MDB2 Package.

I did the following to install

pear install MDB2
pear install MDB2_Driver_mysql
pear channel-update pear.php.net

All apparently worked and if I try again, they say already installed.

The php include path set in php.ini also looks to be correct:

include_path = ".:/Applications/MAMP/bin/php5.3/lib/php"

Yet after restarting the server and trying to hit my site, I still get

Fatal error: require_once() [function.require]: Failed opening required 'MDB2.php' (include_path='.:/Applications/MAMP/bin/php5.3/lib/php') in /Applications/MAMP/htdocs/config.php on line 5

A: 

Is /Applications/MAMP/bin/php5.3/lib/php the root directory for PEAR? That doesn't sound right. Run the command pear config-get php_dir, it will tell you where the PEAR root directory is (despite the misleading configuration name). The default is /usr/share/pear.

Charles