maybe someone will come in handy
i'm use:
PHP 7.2.8
php_mongodb-1.5.1-7.2-nts-vc15-x64
download
maybe someone will come in handy
i'm use:
PHP 7.2.8
php_mongodb-1.5.1-7.2-nts-vc15-x64
download
Last edited by Ulkyome Dev; 28-07-18 at 03:11 AM.
Fatal error: Uncaught Error: Class 'MongoDB\Driver\Manager' not found in C:\BDO_Server_491\www\register\register.php:59 Stack trace: #0 C:\BDO_Server_491\www\register\reg.php(29): register_BDO->__construct(Array, Array) #1 {main} thrown in C:\BDO_Server_491\www\register\register.php on line 59
I use php 7.2 with all extensions and mongodb 4.0
Last edited by logankioma; 02-08-18 at 04:39 AM.
fixed some errors =) first time I work with nosql
https://pastebin.com/y6HAqUBq
- - - Updated - - -
there is another example with a simple authorization, but the script is made for my purposes with the answer in the form of json,if required I can share
The problem continues.
Fatal error: Uncaught Error: Class 'MongoDB\Driver\Manager' not found in C:\BDO_Server_491\www\register\register.php:59 Stack trace: #0 C:\BDO_Server_491\www\register\reg.php(29): register_BDO->__construct(Array, Array) #1 {main} thrown in C:\BDO_Server_491\www\register\register.php on line 59
check the library load https://pastebin.com/kd3UjNCC
scroll down and find the ->
![]()
Last edited by Ulkyome Dev; 02-08-18 at 08:30 PM.
did you check that the phpinfo function was called?very often it happens that the library can not be loaded for various reasons. You have an error in the scripts that there is no mongodb class to which my class refers
- - - Updated - - -
I have installed on the server:
http://nginx.org/download/nginx-1.15.2.zip
https://windows.php.net/download#php-7.2
https://windows.php.net/downloads/pecl/releases/mongodb/1.5.1/php_mongodb-1.5.1-7.2-nts-vc15-x64.zip
Note that the mongo library is under version php 7.2
Do not you use appserv x64?
- - - Updated - - -
With all the settings as you posted there, the error still persists.
Fatal error: Uncaught MongoDB\Driver\Exception\AuthenticationException: Authentication failed. in C:\BDOServer\www\register\register.php:174 Stack trace: #0 C:\BDOServer\www\register\register.php(174): MongoDB\Driver\Manager->executeQuery('loginserver.acc...', Object(MongoDB\Driver\Query)) #1 C:\BDOServer\www\register\register.php(162): register_BDO->count_accounts() #2 C:\BDOServer\www\register\register.php(61): register_BDO->id_account_nr() #3 C:\BDOServer\www\register\reg.php(29): register_BDO->__construct(Array, Array) #4 {main} thrown in C:\BDOServer\www\register\register.php on line 174
parameter --auth needs to be set in the startup parameters of the database, but with the beginning you need to create a user for the database
example of creating a user with rights:
example of starting a databasebin\mongod --auth --dbpath database\data_dbo --port 27017 --bind_ip 127.0.0.1Code:use productsdb.createUser( { "user": "accountUser", "db": "admin", "pwd": "password", "roles": [ { "role": "userAdminAnyDatabase", "db": "admin" }, { "role": "dbAdminAnyDatabase", "db": "admin" }, { "role": "readWriteAnyDatabase", "db": "admin" } ] })
Hello, i try to figure what is the problem.
1. reg.php, that file is missing
https://i.imgur.com/PqC5SzJ.png
(i assume is same file, i change reg.php to reg_example.php)
2.I don' t know if an admin-database account is what really matter.
Now works, but not like i want.
https://www.mediafire.com/file/7kl3x470gcoa1du/reg.rar