PHP Driver | PHP 5.3 | PHP 5.4 | PHP 5.5 | PHP 5.6 | PHP 7.0 | HHVM 3.9 |
---|---|---|---|---|---|---|
mongodb-1.1 | ✓ | ✓ | ✓ | ✓ | ✓ | |
mongodb-1.0 | ✓ | ✓ | ✓ | ✓ | ||
mongo-1.6 | ✓ | ✓ | ✓ | ✓ | ||
mongo-1.5 | ✓ | ✓ | ✓ | ✓ |
下载mongodb之后使用phpize安装
phpize ./configure --with-php-config=/usr/local/php/bin/php-config make make install #php.ini加 extension =mongodb.so php composer.phar require jenssegers/mongodb
提示错误,php扩展mbstring错误,用phpize编译安装mbstring
Your requirements could not be resolved to an installable set of packages. Problem 1 - danielstjules/stringy 1.10.0 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system. - danielstjules/stringy 1.10.0 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system. - danielstjules/stringy 1.10.0 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system. - Installation request for danielstjules/stringy == 1.10.0.0 -> satisfiable by danielstjules/stringy[1.10.0]. Installation failed, reverting ./composer.json to its original content.