Ah, you may be right. I just double checked and I can indeed log into MongoDB (via commandline) without a password! I can't actually do anything once I'm in (until I authenticate), but it's still not ideal. And as you say, it may be the cause of my issue.
I appreciate the additional info and insight! 👍 I tried to set up a simple mongodb and use adminer as a GUI tool but I still get this error after hours of googling so any help is much appreciated. What I have tried is getting into the container using
still got the error message (things seemed to run fine) so I tried this comment but it's no used. I am inexperienced when it comes to docker or php. Thank you in advance for any tips or solutions I am using this image that is working as expected. https://hub.docker.com/r/clue/adminer/ The only problem is that it does not has php extensions required to connect MongoDB or Oracle...
Is there an image that includes support for these 2 database? Edit: I can use another container for Oracle and mongodb like this. But then this container does not support mssql and postgresql. I am looking for all DB support in a single image.
And mongoDB can be connected using this.
Edit 2: The dockerfile for oracle is available here. https://github.com/davidgaya/docker-apache-php-oci/blob/master/Dockerfile But I am not sure how to merge these 2 docker files.
Ah, you may be right. I just double checked and I can indeed log into MongoDB (via commandline) without a password! I can't actually do anything once I'm in (until I authenticate), but it's still not ideal. And as you say, it may be the cause of my issue.
I appreciate the additional info and insight! 👍 I tried to set up a simple mongodb and use adminer as a GUI tool but I still get this error after hours of googling so any help is much appreciated. What I have tried is getting into the container using
still got the error message (things seemed to run fine) so I tried this comment but it's no used. I am inexperienced when it comes to docker or php. Thank you in advance for any tips or solutions I am using this image that is working as expected. https://hub.docker.com/r/clue/adminer/ The only problem is that it does not has php extensions required to connect MongoDB or Oracle...
Is there an image that includes support for these 2 database? Edit: I can use another container for Oracle and mongodb like this. But then this container does not support mssql and postgresql. I am looking for all DB support in a single image.
And mongoDB can be connected using this.
Edit 2: The dockerfile for oracle is available here. https://github.com/davidgaya/docker-apache-php-oci/blob/master/Dockerfile But I am not sure how to merge these 2 docker files. Docs Home → MongoDB Drivers On this page
Welcome to the documentation site for the official MongoDB PHP driver. You can add the driver to your application to work with MongoDB in PHP. The MongoDB PHP Driver consists of the two following components:
While it is possible to use the extension alone, MongoDB recommends using both the extension and the library together. Download the components you need or set up a runnable project by following our tutorials.
First, make sure you have a recent version of PHP installed on your system. See the official PHP manual for download and installation instructions. Install the PHP MongoDB Extension before installing the PHP Library for MongoDB. You can install the extension using PECL on the command line:
Finally, add the following line to your NoteOn some systems, there may be multiple INI files for individual SAPIs (e.g. CLI, FPM). Make sure to enable the extension in all SAPIs that you need. The preferred method of installing the PHP library is with Composer by running the following from your project root:
Additional installation instructions may be found in the library documentation. To connect to a MongoDB Atlas cluster, use the Atlas connection string for your cluster:
NoteIf you need to run a MongoDB server on your local machine for development purposes instead of using an Atlas cluster, you need to complete the following:
ImportantAlways secure your MongoDB server from malicious attacks. See our Security Checklist for a list of security recommendations. After you successfully start your MongoDB server, specify your connection string in your driver connection code. If your MongoDB Server is running locally, you can use the connection string If you need to specify a different hostname or IP address, see our Server Manual entry on Connection Strings. To test whether you can connect to your server, replace the connection string in the Connect to MongoDB Atlas code example and run it. Due to potential problems representing 64-bit integers on 32-bit platforms, users are advised to use 64-bit environments. When using a 32-bit platform, be aware that any 64-bit integer read from the database will be returned as a MongoDB\BSON\Int64 instance instead of a PHP integer type. The following compatibility table specifies the recommended version(s) of the PHP driver for use with a specific version of MongoDB. The first column lists the driver version(s).
The following compatibility table specifies the recommended version(s) of the PHP driver for use with a specific version of PHP. The first column lists the driver version(s).
For more information on how to read the compatibility tables, see our guide on MongoDB Compatibility Tables.
Does PHP support Mongodb?You can add the driver to your application to work with MongoDB in PHP. The MongoDB PHP Driver consists of the two following components: The extension , which provides a low-level API and mainly serves to integrate libmongoc and libbson with PHP. How do I install or enable PHP's Mongodb extension?Installing the MongoDB PHP Library. $ composer require mongodb/mongodb.. Using version ^1.8 for mongodb/mongodb.. ./ composer. ... . Running composer update mongodb/mongodb.. Loading composer repositories with package information.. Updating dependencies.. Lock file operations: 4 installs, 0 updates, 0 removals.. Writing lock file.. How connect Mongodb to xampp?Installing MongoDB in XAMPP Windows. Install mongoDB in the following path: c:/mongodb.. Go to your c:/ drive then create a new folder “data“, inside it create another folder “db“. Start MongoDB in your command prompt by executing the following command: C:\mongodb\bin\mongod.exe.. Does PHP support Mongodb?You can add the driver to your application to work with MongoDB in PHP. The MongoDB PHP Driver consists of the two following components: The extension , which provides a low-level API and mainly serves to integrate libmongoc and libbson with PHP.
How do I install or enable PHP's Mongodb extension?Installing the MongoDB PHP Library. $ composer require mongodb/mongodb.. Using version ^1.8 for mongodb/mongodb.. ./ composer. ... . Running composer update mongodb/mongodb.. Loading composer repositories with package information.. Updating dependencies.. Lock file operations: 4 installs, 0 updates, 0 removals.. Writing lock file.. |