How do you determine the correct dll for mongo php extension?

I have a problem downloading the php extension for mongo. I am running Windows 7 (32bt), with php 5.2. I am trying to update a php.ini file with the correct dll name, but don't know which of the dll to use. I know which php file to update.

two sites found:

https://github.com/stealth35/stealth35.github.com/downloads

https://github.com/mongodb/mongo-php-driver/downloads

of these two sites, which versions (32bt) should I use?

Any help on this would be greatly appreciated. thanks.

+8
dll mongodb
source share
1 answer

I will recommend 3rd place https://s3.amazonaws.com/drivers.mongodb.org/php/index.html

Now, if you look in the latest version: php_mongo-1.4.5.zip (there are older versions too), you will see

php_mongo-1.4.5-5.2-vc9-nts.dll php_mongo-1.4.5-5.2-vc9.dll php_mongo-1.4.5-5.3-vc9-nts-x86_64.dll php_mongo-1.4.5-5.3-vc9-nts.dll php_mongo-1.4.5-5.3-vc9-x86_64.dll php_mongo-1.4.5-5.3-vc9.dll php_mongo-1.4.5-5.4-vc9-nts-x86_64.dll php_mongo-1.4.5-5.4-vc9-nts.dll php_mongo-1.4.5-5.4-vc9-x86_64.dll php_mongo-1.4.5-5.4-vc9.dll php_mongo-1.4.5-5.5-vc11-nts-x86_64.dll php_mongo-1.4.5-5.5-vc11-nts.dll php_mongo-1.4.5-5.5-vc11-x86_64.dll php_mongo-1.4.5-5.5-vc11.dll 

x86_64 are 64-bit versions, since you are using 32-bit windows, you can ignore them, and the number that comes after 1.4.5 (mongo version) is the php version, expecting aka 1.4.5-5.3 php 5.3, mongo 1.4.5 to narrow down the list to:

 php_mongo-1.4.5-5.2-vc9-nts.dll php_mongo-1.4.5-5.2-vc9.dll 

vc9 refers to the visual studio with which it was compiled, I believe that vs9 is VS2008, and nts refers to "Non-Thread Safe", if you use threads, use php_mongo-1.4.5-5.2-vc9.dll,

Put it in the "ext" directory for your php installation (or wherever the extension directory is located), then add

 extension=php_mongo-1.4.5-5.2-vc9.dll 

or extension = php_mongo.dll (if you rename it to php_mongo.dll) to your php.ini

+17
source share

All Articles