mohammad zahedi
mohammad zahedi

Reputation: 323

have error when install MongoDB Extension for Yii 2

I have wamp in my local system and the version of php is 5.5.12, also I installed the drivers and in the phpinfo it is shown that the mongodb is installed as well, but when I want to install mongo extension with composer I face error with the content of “first install mongo driver”. However I’ve tried a lot to install the mongo driver without any success. Please guide me.

Upvotes: 1

Views: 124

Answers (1)

Bizley
Bizley

Reputation: 18021

There are two ini files for PHP - one for CGI and one for CLI version. You need to check if this extension is added in both of them. This line (or similar) should be added and uncommented.

extension=php_mongo.dll

In new Wamp these two files are just one in fact (the second one is symlinked to the first one) - if this is the case you need to check if this extension is installed properly.

Ini files can be there:

wamp\bin\php\php{version}
wamp\bin\apache\apache{version}\bin

Also check this link for help.

Upvotes: 1

Related Questions