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?
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.