I'd like to install the PHP driver on MAMP 1.9.6 (OS X 10.5.8) and PHP 5.3
I did all the stuff said on http://www.mongodb.org/display/DOCS/PHP+Language+Center But it still won't work.
If i try to connect it throws an error "Fatal Error: Class 'Mongo' not found" But in PHPStorm the Mongo class is found and autocomplete works. I added the extension in the php.ini
To install Mongo in terminal I wrote
sudo /Applications/MAMP/bin/php5.3/bin/pecl install mongo
And everything was installed properly.
What am I doing wrong?
sudo pecl install mongo
I believe you have to do the following first:
sudo port install mongodb
I followed this link when installing and had no problems: Apache, PHP and MongoDB on Mac OS X
Follow this guide:
http://www.davidgolding.net/mongodb/installing-mongodb-on-mamp-1-9-5.html
The key part is grabbing the driver binary here: https://github.com/mongodb/mongo-php-driver/downloads
Copy the binary to the location stated in the guide, then make the change to your php.ini file.
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.