Tuesday, March 15, 2011

install mongodb php driver on windows

Download the correct driver for your environment from http://github.com/mongodb/mongo-php-driver/downloads. For my case, i download "mongo-1.1.4.zip — All of the Windows build for the 1.1.4 release"

Unzip the package. There are several entries, for example:


Based on the official document, vc6 is for Apache (vc9 is for IIS). 'ts' means Thread Save. Thread safe is for running PHP as an Apache module (typical installation), non-thread safe is for CGI.

So i copy the mongo.dll from the mongo-1.1.4-php5.2vc6ts folder to my php/ext/ folder. And then update my php.ini by adding extension=php_mongo.dll

Finally, restart my apache and then have a look at phpinfo(), i can find a mongo section. It is done

No comments: