Reputation: 553
Computer: Mid 2009 Mac Book Pro with OSX Lion
Hi, I am currently having trouble with my Symfony2 installation.
I am working on a Symfony2 collab project with some friend and we are using composer and git to coordinate all of our work together. This being said, I normally used composer to fetch anything I needed and there was no problem whatsoever.
However they have recently started using MongoDB and thus the MongoDB extension that php uses (and Symfony2) , When I use Composer update this is what the console "spits out"
composer update
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- doctrine/mongodb-odm-bundle 3.0.x-dev requires doctrine/mongodb-odm >=1.0.0-beta5,<1.1-dev -> satisfiable by doctrine/mongodb-odm 1.0.0-BETA5, doctrine/mongodb-odm 1.0.0-BETA6, doctrine/mongodb-odm 1.0.0-BETA7, doctrine/mongodb-odm 1.0.x-dev.
- doctrine/mongodb-odm-bundle v3.0.0-BETA1 requires doctrine/mongodb-odm 1.0.0-BETA5 -> satisfiable by doctrine/mongodb-odm 1.0.0-BETA5.
- doctrine/mongodb-odm-bundle v3.0.0-BETA2 requires doctrine/mongodb-odm >=1.0.0-beta5,<1.1-dev -> satisfiable by doctrine/mongodb-odm 1.0.0-BETA5, doctrine/mongodb-odm 1.0.0-BETA6, doctrine/mongodb-odm 1.0.0-BETA7, doctrine/mongodb-odm 1.0.x-dev.
- doctrine/mongodb-odm-bundle v3.0.0-BETA3 requires doctrine/mongodb-odm >=1.0.0-beta5,<1.1-dev -> satisfiable by doctrine/mongodb-odm 1.0.0-BETA5, doctrine/mongodb-odm 1.0.0-BETA6, doctrine/mongodb-odm 1.0.0-BETA7, doctrine/mongodb-odm 1.0.x-dev.
- doctrine/mongodb-odm 1.0.0-BETA6 requires doctrine/mongodb >=1.0.0-beta1,<1.1-dev -> satisfiable by doctrine/mongodb 1.0.0, doctrine/mongodb 1.0.0-BETA1, doctrine/mongodb 1.0.0-BETA2, doctrine/mongodb 1.0.0-BETA3.
- doctrine/mongodb-odm 1.0.0-BETA7 requires doctrine/mongodb 1.0.* -> satisfiable by doctrine/mongodb 1.0.0, doctrine/mongodb 1.0.0-BETA1, doctrine/mongodb 1.0.0-BETA2, doctrine/mongodb 1.0.0-BETA3.
- doctrine/mongodb-odm 1.0.x-dev requires doctrine/mongodb 1.0.* -> satisfiable by doctrine/mongodb 1.0.0, doctrine/mongodb 1.0.0-BETA1, doctrine/mongodb 1.0.0-BETA2, doctrine/mongodb 1.0.0-BETA3.
- doctrine/mongodb-odm 1.0.0-BETA5 requires doctrine/mongodb 1.0.0-BETA1 -> satisfiable by doctrine/mongodb 1.0.0-BETA1.
- doctrine/mongodb 1.0.0-BETA3 requires ext-mongo >=1.3.1,<1.4-dev -> the requested PHP extension mongo is missing from your system.
- doctrine/mongodb 1.0.0-BETA2 requires ext-mongo >=1.2.12,<1.3-dev -> the requested PHP extension mongo is missing from your system.
- doctrine/mongodb 1.0.0 requires ext-mongo >=1.2.12,<1.4-dev -> the requested PHP extension mongo is missing from your system.
- doctrine/mongodb 1.0.0-BETA1 requires ext-mongo * -> the requested PHP extension mongo is missing from your system.
- Installation request for doctrine/mongodb-odm-bundle 3.0.* -> satisfiable by doctrine/mongodb-odm-bundle 3.0.x-dev, doctrine/mongodb-odm-bundle v3.0.0-BETA1, doctrine/mongodb-odm-bundle v3.0.0-BETA2, doctrine/mongodb-odm-bundle v3.0.0-BETA3.
It is saying that ext-mongo doesn't exist on my system and that it is missing, however when I do the command php -m
php -m
[PHP Modules]
Core
ctype
date
dom
ereg
fileinfo
filter
hash
iconv
json
libxml
mongo
pcre
PDO
pdo_sqlite
Phar
posix
Reflection
session
SimpleXML
SPL
sqlite3
standard
tokenizer
xml
xmlreader
xmlwriter
[Zend Modules]
Needless to say that extension=mongo.so is enabled in the correct php.ini file.
I've tried everything, brew, ports, pecl, pear.... Any suggestions? I am on a tight lockdown.
Upvotes: 0
Views: 1846
Reputation: 1228
if you have brew
install php-mongo
brew install php56-mongo << i am using php 5.6
restart php
launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.php56.plist
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.php56.plist
do the composer again
composer update doctrine/mongodb-odm doctrine/mongodb-odm-bundle
Upvotes: 3
Reputation: 3339
If you're using MAMP, this is likely because only one of the php.ini files was altered to include the mongo extension. Go into path\to\bin\apache\bin\php.ini
and make sure you've added mongo to the list of dynamic extensions.
You'll also want to make sure the mongo binary is in the default extensions folder, and that it's also added to the php.ini
file in path\to\bin\php\php5\php.ini
.
Upvotes: 0