-
-
Notifications
You must be signed in to change notification settings - Fork 655
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot create MongoDB database with Adminer #626
Comments
Creating the MongoDB database and collections via the CLI inside the PHP container works. Once that is done and a document (db entry) is created the database also starts showing on https://localhost/db_mongo.php. So I made a database with a User and Password. However in my code, in the connection string, when I change the user or password I cannot connect, so for me that proves that the database in question does indeed have the right user and access rights. Here is the code I used to make a user and password for the database.
When I go into Adminer and just select Why does it say |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
@robots4life Works fine here. What PHP, Mongo and Adminer version are you using? |
ISSUE TYPE
Checklist
.env
file is attacheddocker-compose.override.yml
is attached (if it exists)cfg/
dir are attached (if customized)docker-compose logs
andlog/
output is addedenv.txt
OS / ENVIRONMENT
Description: Ubuntu 18.04.2 LTS
Release: 18.04
Codename: bionic
SUMMARY
Using Adminer I like to create a MongoDB database and tables. When I try to create a table I get the following error.
Fatal error: Uncaught Error: Call to a member function createCollection() on null in /var/www/default/htdocs/vendor/adminer-4.7.1-en.php:1202 Stack trace: #0 /var/www/default/htdocs/vendor/adminer-4.7.1-en.php(1840): alter_table('', 'item', Array, Array, NULL, '', '', '', '') #1 {main} thrown in /var/www/default/htdocs/vendor/adminer-4.7.1-en.php on line 1202
.When I simply just create a MongoDB database inside Adminer and then log out of Adminer and go back to check
https://localhost/db_mongo.php
the newly created database is not listed, it is not there.STEPS TO REPRODUCE
docker-compose up -d
System : MongoDB
andServer : mongo
. I could not find info in the docs on the MongoDB Username or Password so I just leave those empty.Create database
, give it a name,Save
, done. Even though this database seems to have been created it does not show when going tohttps://localhost/db_mongo.php
. Why?Create table
, give it a name and hitSave
.Fatal error: Uncaught Error: Call to a member function createCollection() on null in /var/www/default/htdocs/vendor/adminer-4.7.1-en.php:1202 Stack trace: #0 /var/www/default/htdocs/vendor/adminer-4.7.1-en.php(1840): alter_table('', 'item', Array, Array, NULL, '', '', '', '') #1 {main} thrown in /var/www/default/htdocs/vendor/adminer-4.7.1-en.php on line 1202
.EXPECTED BEHAVIOUR
Being able to create MongoDB databases and tables with Adminer.
ACTUAL BEHAVIOUR
Created database is never saved or shown under
https://localhost/db_mongo.php
.Fatal error when trying to create database table.
OTHER INFORMATION
Start command
File and user permissions (Linux & MacOS)
The text was updated successfully, but these errors were encountered: