Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Registration page php 7.2 + mongodb 1.5

Newbie Spellweaver
Joined
Jun 19, 2016
Messages
65
Reaction score
13
maybe someone will come in handy
i'm use:
PHP 7.2.8


0vZ9pTA - Registration page php 7.2 + mongodb 1.5 - RaGEZONE Forums


 

Attachments

You must be registered for see attachments list
Last edited:
Junior Spellweaver
Joined
Aug 28, 2012
Messages
141
Reaction score
78
maybe someone will come in handy
i'm use:
PHP 7.2.8


0vZ9pTA - Registration page php 7.2 + mongodb 1.5 - RaGEZONE Forums



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
 

Attachments

You must be registered for see attachments list
Last edited:
Newbie Spellweaver
Joined
Jun 19, 2016
Messages
65
Reaction score
13
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
fixed some errors =) first time I work with nosql




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
 
Junior Spellweaver
Joined
Aug 28, 2012
Messages
141
Reaction score
78
fixed some errors =) first time I work with nosql




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
 
Newbie Spellweaver
Joined
Jun 19, 2016
Messages
65
Reaction score
13
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
do you have a library in php mongodb?
 
Junior Spellweaver
Joined
Aug 28, 2012
Messages
141
Reaction score
78
I use localhost



check the library load

scroll down and find the ->
h5cJ7wk - Registration page php 7.2 + mongodb 1.5 - RaGEZONE Forums

I changed php, I put php 7.1 the extension mongoDB and it does not work, of the same error
 

Attachments

You must be registered for see attachments list
Newbie Spellweaver
Joined
Jun 19, 2016
Messages
65
Reaction score
13
I use localhost





I changed php, I put php 7.1 the extension mongoDB and it does not work, of the same error

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



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
 
Junior Spellweaver
Joined
Aug 28, 2012
Messages
141
Reaction score
78
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



I have installed on the server:



Note that the mongo library is under version php 7.2

Do not you use appserv x64?



Do not you use appserv x64?

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
 
Newbie Spellweaver
Joined
Jun 19, 2016
Messages
65
Reaction score
13
Do not you use appserv x64?





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

now are swearing at the fact that authorization with an error, the server mongodb you have enabled authorization?
 
Newbie Spellweaver
Joined
Jun 19, 2016
Messages
65
Reaction score
13
Where do I do this? I'm lost here!

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:
Code:
use productsdb.createUser(   {     "user": "accountUser",	 "db": "admin",     "pwd": "password",     "roles": [            {                "role": "userAdminAnyDatabase",                "db": "admin"            },            {                "role": "dbAdminAnyDatabase",                "db": "admin"            },            {                "role": "readWriteAnyDatabase",                "db": "admin"            }        ]   })

example of starting a databasebin\mongod --auth --dbpath database\data_dbo --port 27017 --bind_ip 127.0.0.1
 
Newbie Spellweaver
Joined
Sep 16, 2018
Messages
10
Reaction score
3
Hello, i try to figure what is the problem.
1. reg.php, that file is missing

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

 
Junior Spellweaver
Joined
Aug 28, 2012
Messages
141
Reaction score
78
Hello, i try to figure what is the problem.
1. reg.php, that file is missing

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


The account is created, to see in the db, but when trying to log in with the client this message appears >>>>> account is incorrect or does not exist
 
Back
Top