Adminer none of the supported php extensions (mongo, mongodb) are available

It appears that your MongoDB supports a log-in using both a password and no password. Or possibly the check in Adminer is a false-positive.

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.

In any case, I can't do anything about this 

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 docker exec -it <my_container> -u root sh and executing:
pecl install mongodb -> Cannot find autoconf so I tried the old solution which is:

apk add --no-cache --virtual .phpize-deps-configure $PHPIZE_DEPS
pecl install mongodb
docker-php-ext-enable mongodb
apk del --no-network .phpize-deps-configure

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...

Oracle
None of the supported PHP extensions (OCI8, PDO_OCI) are available.

MongoDB
None of the supported PHP extensions (mongo) are available.

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.

wget http://www.adminer.org/latest.php -O /tmp/index.php

docker run -d -p 8080:80 -v /tmp/:/app lukaszkinder/apache-php-oci8-pdo_oci

And mongoDB can be connected using this.

docker run -d -p 8070:80 -v /tmp:/var/www/html ishiidaichi/apache-php-mongo-phalcon

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.

It appears that your MongoDB supports a log-in using both a password and no password. Or possibly the check in Adminer is a false-positive.

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.

In any case, I can't do anything about this 

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 docker exec -it <my_container> -u root sh and executing:
pecl install mongodb -> Cannot find autoconf so I tried the old solution which is:

apk add --no-cache --virtual .phpize-deps-configure $PHPIZE_DEPS
pecl install mongodb
docker-php-ext-enable mongodb
apk del --no-network .phpize-deps-configure

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...

Oracle
None of the supported PHP extensions (OCI8, PDO_OCI) are available.

MongoDB
None of the supported PHP extensions (mongo) are available.

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.

wget http://www.adminer.org/latest.php -O /tmp/index.php

docker run -d -p 8080:80 -v /tmp/:/app lukaszkinder/apache-php-oci8-pdo_oci

And mongoDB can be connected using this.

docker run -d -p 8070:80 -v /tmp:/var/www/html ishiidaichi/apache-php-mongo-phalcon

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 HomeMongoDB Drivers

On this page

  • Introduction
  • Installation
  • Connect to MongoDB Atlas
  • Connect to a MongoDB Server on Your Local Machine
  • Compatibility
  • See Also

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:

  • The extension, which provides a low-level API and mainly serves to integrate libmongoc and libbson with PHP.

  • The library, which provides a high-level API for working with MongoDB databases consistent with other MongoDB language drivers.

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.

  • Tutorials

  • Extension Architecture and Internals

  • Documentation

    • Library

    • Extension

  • Changelog

    • Library

    • Extension

  • Source Code

    • Library

    • Extension

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:

$ sudo pecl install mongodb

Finally, add the following line to your php.ini file:

Note

On 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:

$ composer require mongodb/mongodb

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:

<?php
$client = new MongoDB\Client(
'mongodb+srv://<username>:<password>@<cluster-address>/test?retryWrites=true&w=majority'
);
$db = $client->test;

Note

If 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:

  1. Download the Community or Enterprise version of MongoDB Server.

  2. Install and configure MongoDB Server.

  3. Start the server.

Important

Always 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 "mongodb://localhost:<port>" where <port> is the port number you configured your server to listen for incoming connections.

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).

Icon

Explanation

All features are supported.

The Driver version will work with the MongoDB version, but not all new MongoDB features are supported.

No mark

The Driver version is not tested with the MongoDB version.

PHP Driver Versions

MongoDB 6.0

MongoDB 5.0

MongoDB 4.4

MongoDB 4.2

MongoDB 4.0

MongoDB 3.6

MongoDB 3.4

MongoDB 3.2

MongoDB 3.0

MongoDB 2.6

ext 1.14 + lib 1.13

ext 1.13 + lib 1.12

ext 1.12 + lib 1.11

ext 1.11 + lib 1.10

ext 1.10 + lib 1.9

✓ [1]

ext 1.9 + lib 1.8

ext 1.8 + lib 1.7

ext 1.7 + lib 1.6

ext 1.6 + lib 1.5

ext 1.5 + lib 1.4

ext 1.4 + lib 1.3

ext 1.3 + lib 1.2

ext 1.2 + lib 1.1

ext 1.1 + lib 1.0

ext 1.0

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).

PHP Driver Versions

PHP 8.1

PHP 8.0

PHP 7.4

PHP 7.3

PHP 7.2

PHP 7.1

PHP 7.0

PHP 5.6

PHP 5.5

ext 1.14 + lib 1.13

ext 1.13 + lib 1.12

ext 1.12 + lib 1.11

ext 1.11 + lib 1.10

ext 1.10 + lib 1.9

ext 1.9 + lib 1.8

ext 1.8 + lib 1.7

ext 1.7 + lib 1.6

ext 1.6 + lib 1.5

ext 1.5 + lib 1.4

ext 1.4 + lib 1.3

ext 1.3 + lib 1.2

For more information on how to read the compatibility tables, see our guide on MongoDB Compatibility Tables.

  • Ask questions on our MongoDB Community Forums.

  • Visit our Support Channels.

  • File an issue or feature request in JIRA under one of the following: - Extension - Library

  • PHP Libraries, Frameworks, and Tools

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..