简体   繁体   English

使用MAMP安装PEAR MDB2时出现问题

[英]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. 我在Macbook上安装了MAMP的副本,因此可以在本地运行基于php / mysql的网站。

The MAMP package itself seems to work fine but I needed the PEAR MDB2 Package. MAMP软件包本身似乎运行良好,但我需要PEAR MDB2软件包。

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: php.ini中设置的php include路径也看起来是正确的:

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 致命错误:require_once()[function.require]:无法在/ Applications / MAMP / htdocs /中打开所需的'MDB2.php'(include_path ='。:/ Applications / MAMP / bin / php5.3 / lib / php')第5行的config.php

Is /Applications/MAMP/bin/php5.3/lib/php the root directory for PEAR? /Applications/MAMP/bin/php5.3/lib/php是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). 运行命令pear config-get php_dir ,它将告诉您PEAR根目录在哪里(尽管配置名称令人误解)。 The default is /usr/share/pear . 默认值为/usr/share/pear

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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