Closed omyhub closed 3 years ago
i guess that it can't parse '+svr'
Hi, thanks for the input.
From memory, we are adding the +srv in depending on selected settings.
The url is built up within the code, therefore adding it manually will fail to parse.. I will make a note of this to wrap the process in a test to check the input a bit more thoroughly..
I will be back onto the project full time after Easter and will also complete the remaining sections
Thank You, Gilbert Rehling
On Thu, Mar 25, 2021 at 7:41 PM omyhub @.***> wrote:
i guess that it can't parse '+svr'
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/php-mongo/admin/issues/9#issuecomment-806506640, or unsubscribe https://github.com/notifications/unsubscribe-auth/AATRDMT5NJSVFYCYWTRLYL3TFMANNANCNFSM4ZY7SO7A .
This problem has been partially resolved with the latest push in early Sept.
Options for creating MongoDb Cloud server configurations have now been added and the URI builder has been optimised to handle Atlas Cloud styled URI:
mongodb+srv://username:password@cluster-id.mongodb.net/database-name?retryWrites=true&w=majority
ToDo: add another Server Configuration param to enforce the use of 'mongodb+srv" for non Atlas Cloud servers.
Pending some more testing for non Atlas Cloud server using 'mongodb+srv, this issue will soon be closed
This ability in the application has now been completed and verified. Welcome to MongoDb Atlas!!!
[2021-03-25 09:28:31] local.ERROR: Failed to parse MongoDB URI: 'mongodb+srv://x.x.x.x:27017'. Invalid service name in URI. {" exception":"[object] (MongoDB\Driver\Exception\InvalidArgumentException(code: 0): Failed to parse MongoDB URI: 'mongodb+srv://x.x.x.x:27017'. Invalid service name in URI. at /data/www/mongodbadmin/vendor/mongodb/mongodb/src/Client.php:116) [stacktrace]
relatived file: ./app/Helpers/MongoHelper.php ./app/Http/Classes/MongoConnection.php
version: admin-1.0.1-alpha-2.5