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

sixlive picture sixlive  路  3Comments

nickfan picture nickfan  路  3Comments

percymamedy picture percymamedy  路  3Comments

mikeerickson picture mikeerickson  路  3Comments

ankit20893 picture ankit20893  路  3Comments