Answer the question
In order to leave comments, you need to log in
Php Comet + Sokil\Mongo, why class '\MongoCollection' not found, although mongodb is installed on php?
I already tried to connect it - it worked. And with comet php page 500 response and in the logs
[ERR] /var/www/vendor/sokil/php-mongo/src/Collection.php:207 >> Class '\MongoCollection' not found
C:\Program Files\JetBrains\PhpStorm 2020.2.2\plugins\php\lib\php.jar!\stubs\mongo\mongo.php
FROM php:7.4-cli
RUN docker-php-ext-install sockets && apt-get update \
&& apt-get install -y libevent-dev libcurl4-openssl-dev pkg-config libssl-dev libonig-dev curl zip unzip \
&& pecl install event mongodb \
&& docker-php-ext-enable event mongodb \
&& docker-php-ext-install mbstring pcntl
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
COPY ./client_shop/backend /var/www
WORKDIR /var/www
RUN composer install
CMD php ./src/app.php stop
CMD php ./src/app.php start
{
"require": {
"gotzmann/comet": "^1.2",
"sokil/php-mongo": "^1.23"
},
"autoload": {
"psr-4": { "app\\": "src/" }
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question