4

I want to update the composer:

but i am getting following errors:

Problem 1 - yiisoft/yii2-mongodb 2.0.4 requires ext-mongo >=1.5.0 -> the requested PHP extension mongo is missing from your system. - yiisoft/yii2-mongodb 2.0.3 requires ext-mongo >=1.5.0 -> the requested PHP extension mongo is missing from your system. - yiisoft/yii2-mongodb 2.0.2 requires ext-mongo >=1.5.0 -> the requested PHP extension mongo is missing from your system. - yiisoft/yii2-mongodb 2.0.1 requires ext-mongo >=1.4.0 -> the requested PHP extension mongo is missing from your system. - yiisoft/yii2-mongodb 2.0.0 requires ext-mongo >=1.3.0 -> the requested PHP extension mongo is missing from your system. - Installation request for yiisoft/yii2-mongodb ~2.0.0 -> satisfiable by yiisoft/yii2-mongodb[2.0.0, 2.0.1, 2.0.2, 2.0.3, 2.0.4]. 

this is my composer.json:

{ "name": "yiisoft/yii2-app-advanced", "description": "Yii 2 Advanced Project Template", "keywords": ["yii2", "framework", "advanced", "project template"], "homepage": "http://www.yiiframework.com/", "type": "project", "license": "BSD-3-Clause", "support": { "issues": "https://github.com/yiisoft/yii2/issues?state=open", "forum": "http://www.yiiframework.com/forum/", "wiki": "http://www.yiiframework.com/wiki/", "irc": "irc://irc.freenode.net/yii", "source": "https://github.com/yiisoft/yii2" }, "minimum-stability": "stable", "require": { "php": ">=5.4.0", "yiisoft/yii2": ">=2.0.4", "yiisoft/yii2-bootstrap": "*", "yiisoft/yii2-swiftmailer": "*", "yiisoft/yii2-imagine": "*", "2amigos/yii2-ckeditor-widget": "~1.0", "2amigos/yii2-tinymce-widget": "~1.1", "facebook/php-sdk-v4" : "~5.0", "yiisoft/yii2-mongodb": "~2.0.0" }, "require-dev": { "yiisoft/yii2-codeception": "*", "yiisoft/yii2-debug": "*", "yiisoft/yii2-gii": "*", "yiisoft/yii2-faker": "*" }, "config": { "process-timeout": 1800 }, "extra": { "asset-installer-paths": { "npm-asset-library": "vendor/npm", "bower-asset-library": "vendor/bower" } } } 

How can i solve this? Please help.

3 Answers 3

2

It might be related to your php.ini with missing mongo.so extension.

Even if you have it enabled already for php in browser, composer uses php.ini for cli. It's different php.ini file.

You can find it via:

php --ini 

There will be something like:

Loaded Configuration File: /etc/php5/cli/php.ini 

Edit this file with sudo:

sudo nano /etc/php5/cli/php.ini 

And complete the extension there (last line should be fine):

extension=mongo.so 

Restart php and retry composer install.

It it works, you're done. If not, try to follow mongo install guide.

Sign up to request clarification or add additional context in comments.

3 Comments

hey.. in /etc/php5/cli/php.ini there is no that externsion
and can you please see my one more question: stackoverflow.com/questions/33235223/…
how can I do it via cmd ?
1

you must install extention to your php . Refer this: http://php.net/manual/ru/mongo.installation.php

14 Comments

can you please explain how?
it is depended on your operation system
and i have seen taht in php.ini file mongo.so is enabled
if you can't fix your problem. We search other reasons okey
you must add extention=mongo.so in your php.ini file and run cmd composer update
|
0

add extension

extension=mongo.so 

to file /etc/php5/cli/php.ini

then restart php

sudo service apapche restart 

and retry your install compose command

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.