46

I have this code

    $passengerId = new \MongoId(oPassenger->getId());

    return $this->createQueryBuilder('Device')
        ->update()
        ->multiple(true)
        ->field('activated')->set(false)
        ->field('passenger')->unsetField()->equals($passengerId)
        ->field('_id')->notEqual($deviceId)
        ->getQuery()
        ->execute();

which works just fine on my dev server but crashes on my local machine.

running pecl list on dev returns

APC     3.1.13  beta
amqp    1.2.0   stable
intl    3.0.0   stable
mongo   1.3.7   stable

and on local returns:

mongo   1.5.6   stable
xdebug  2.2.5   stable

the crash message on my machine is

"name":"MongoException","message":"Invalid object ID"},"code":500}

I'v tried downgrading my local version of mongo but i couldn't figure it out with pecl's poor documentation. for example i tried this:

sudo pecl upgrade -f -c channel://pecl.php.net/mongo-1.3.7

but i keep on getting channel does not exist for all my channel permutations.

also running mongod --version locally returns db version v2.6.0 and on dev returns db version v2.4.3

ideas?

1 Answer 1

74

To downgrade, you can try this:

pecl install mongo-1.3.7


Then pecl list will show you that it worked.

2
  • 12
    One may need to force: pecl install -f mongo-1.3.7
    – bishop
    Jan 3, 2017 at 18:29
  • Or just pecl uninstall mongo then pecl install mongo-1.3.7
    – Yvan
    Mar 28 at 6:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .