Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

install problem #158

Closed
xinshengsiyu opened this issue Sep 22, 2017 · 2 comments
Closed

install problem #158

xinshengsiyu opened this issue Sep 22, 2017 · 2 comments

Comments

@xinshengsiyu
Copy link

xinshengsiyu commented Sep 22, 2017

Hi, when I install this ext by composer, the problems occurred

  • Installation request for sokil/php-mongo ^1.22 -> satisfiable by sokil/php-mongo[1.22].
  • sokil/php-mongo 1.22 requires ext-mongo >=0.9.0 -> the requested PHP extension mongo is missing from your system.

the php info as below

php -i | grep mongo
/usr/local/etc/php/5.6/conf.d/ext-mongodb.ini,
mongodb
libmongoc bundled version => 1.5.5
libmongoc SSL => enabled
libmongoc SSL library => OpenSSL
libmongoc crypto => enabled
libmongoc crypto library => libcrypto
libmongoc crypto system profile => disabled
libmongoc SASL => enabled
mongodb.debug => no value => no value
@sokil
Copy link
Owner

sokil commented Sep 22, 2017

MongoDb has two extensions to work with php.

  1. ext-mongo works only in php < 7.0
  2. ext-mongodb works in all versions

This library works directly with old ext-mongo extension, so it checks existance of extension in composer. With new extension library works through adapter https://github.com/alcaeus/mongo-php-adapter

So to install this library through adapter you need to skip platform requirements.

composer require "alcaeus/mongo-php-adapter"
composer require "sokil/php-mongo" --ignore-platform-reqs

@xinshengsiyu
Copy link
Author

thx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants