bomberdini
bomberdini

Reputation: 139

WAMP MongoDB - PHP extension

I have a problem with installation of MongoDB extension to PHP in WAMP SERVER.

The error that I obtain is show in photoenter image description here

Upvotes: 2

Views: 4524

Answers (4)

cliftonf
cliftonf

Reputation: 67

One other piece of information on this:

  • After you do "add extension=mongodb in bin->apache->apache(version)->bin->php.ini", you have to exit wampserver (right click the systray icon an choose exit) and restart it for it to "see" your change in the apache php file. Simply stopping and starting all services from the left click menu of wampserver does not refresh this new setting.

Upvotes: 1

vimuth
vimuth

Reputation: 5602

For the latest versions, we have to be careful about thread-safe version of the dll file too.

You can download latest dll from this link. https://pecl.php.net/package/mongodb

enter image description here

And in this link, you have thread-safe and and non-thread-safe versions of .dll file.

enter image description here

if you have php7ts.dll or ts.dll file in your PHP installed directory you need to download that thread-safe dll file.

enter image description here

And after download you can add dll file to \wamp\bin\php\php{version}\ext directory and call inside php.ini file

extension=php_mongodb.dll

Upvotes: 6

Damian Olmos
Damian Olmos

Reputation: 1

add extension=mongodb in bin->apache->apache(version)->bin->php.ini

Upvotes: 0

RiggsFolly
RiggsFolly

Reputation: 94642

That is telling you that you have not added the following line to the correct php.ini file

Use

wampmanager -> PHP -> php.ini

to edit the CORRECT php.ini file.

Add your

extension=php_mongo.dll 

with the other extension lines

If you have an extension line set in the correct php.ini file, then you need to ensure that the DLL with the same name is in the \wamp\bin\php\php{version}\ext folder

Upvotes: 1

Related Questions