PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Friday, January 21, 2022

[FIXED] have error when install MongoDB Extension for Yii 2

 January 21, 2022     composer-php, mongodb, yii2     No comments   

Issue

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.


Solution

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.



Answered By - Bizley
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing