Laradock: There is a problem with mongo

Created on 7 Jul 2016  路  3Comments  路  Source: laradock/laradock

When I trying to run laravel with mongo, I've receiving Class 'MongoClient' not found.
Do anyone know how to fix it ?

Question

Most helpful comment

No, the problem was with PHP driver.
I've changed the mongo part of dockerfile for PHP-FPM to this:

RUN curl https://pecl.php.net/get/mongo-1.5.8.tgz > /tmp/mongo.tgz
RUN tar -xpzf /tmp/mongo.tgz -C /tmp
RUN mv /tmp/mongo-1.5.8 /usr/src/php/ext
RUN docker-php-ext-install mongo-1.5.8
RUN pecl install mongo && docker-php-ext-enable mongo

And now it work

All 3 comments

have you followed these docs https://github.com/LaraDock/laradock#Use-Mongo

seems you didn't required jenssegers/mongodb

No, the problem was with PHP driver.
I've changed the mongo part of dockerfile for PHP-FPM to this:

RUN curl https://pecl.php.net/get/mongo-1.5.8.tgz > /tmp/mongo.tgz
RUN tar -xpzf /tmp/mongo.tgz -C /tmp
RUN mv /tmp/mongo-1.5.8 /usr/src/php/ext
RUN docker-php-ext-install mongo-1.5.8
RUN pecl install mongo && docker-php-ext-enable mongo

And now it work

@AminMkh

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sudden-break picture sudden-break  路  3Comments

Mahmoudz picture Mahmoudz  路  3Comments

ejblom picture ejblom  路  3Comments

dioseltorre picture dioseltorre  路  3Comments

szyzak picture szyzak  路  3Comments