Skip to content
Advertisement

Tag: mongodb

Dockerfile | Alpine | Nginx | php7 | MongoDB | Redis

I am looking for a Dockerfile which has Nginx, Php7, MongoDB & Redis enabled on Alpine. Managed to get below but while executing it I see below errors. Please suggest. Dockerfile:- Error:- /bin/sh: docker-php-source: not found /bin/bash: pecl: command not found Referred:- https://github.com/TrafeX/docker-php-nginx/blob/master/Dockerfile After commenting from line 2 to line 10, I managed to get Nginx running but In logs

Error when saving data on a specific date and time

I have a server with Debian 10,Apache/2.4.38, MySQLi, mongodb and Php. The server is running a custom PHP program which allows users to upload their measurements (in .csv files) which are then stored in mongodb. The uploaded .csv files must comply with a predetermined format in order to be uploaded, like so: The timestamp must be set every 15 minutes

Add Timestamp while insertMany() in mongoDB

Hi I am MySQL user and new to mongoDB. I get data from my IOT devices as following: I am inserting it into mongoDB using PHP CodeIgnitor as following: data is getting inserted in collection named as given key as following: Now I want to add timestamp to every row getting inserted. I want data getting inserted as following :

Fatal error while: sudo pecl install mongodb

I have problem to install mongodb with pecl. After sudo pecl install mongodb it’s always give me fatal error: ‘php.h’ file not found #include 1 error generated. make: *** [php_phongo.lo] Error 1 ERROR: ‘make’ failed System MacOS Mojave, Xcode was updated Thanks! Answer Problem was probably that I install oldest version PHP than was installed on my mac, after changing

Trying to iterate over a mongodb cursor twice – failing

I am executing a query against my mongodb database… and then in two separate spots in my front end logic, I need to iterate through the results to extract / show different information. Problem The second time I try to iterate through, I get the following error message: Fatal error: Uncaught MongoDBDriverExceptionLogicException: Cursors cannot yield multiple iterators in /var/www/localhost/htdocs/widgets/exception_details.php:46 Stack

Mongodb aggregate group by day (php)

I have a collection with documents that look like this: I want to group and count these documents based on the accountCreated date (count per day), but I am stuck with the handling of dates since the date includes time as well. This is what I have, but it returns the count including the time, witch means lots of entries

How install PHP’s MongoDB driver — “pecl install mongo” fails

How do I install PHP’s MongoDB client driver? I’ve done this already: But the next step fails: When I have a look at http://pecl.php.net/mongo, I find listed many versions of the Mongo driver. Am I supposed to include a version number or something? However all installation instructions I’ve found simply state that one use sudo pecl install mongo and nothing

Advertisement