简体   繁体   中英

Problems installing PEAR MDB2 with MAMP

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

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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM