Registration page php 7.2 + mongodb 1.5

Results 1 to 15 of 15
  1. #1
    Member Ulkyome Dev is offline
    MemberRank
    Jun 2016 Join Date
    RussianLocation
    65Posts

    note Registration page php 7.2 + mongodb 1.5

    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.


  2. #2
    Valued Member logankioma is offline
    MemberRank
    Aug 2012 Join Date
    142Posts

    Re: Registration page php 7.2 + mongodb 1.5

    Quote Originally Posted by Ulkyome Dev View Post
    maybe someone will come in handy
    i'm use:
    PHP 7.2.8
    php_mongodb-1.5.1-7.2-nts-vc15-x64



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

  3. #3
    Member Ulkyome Dev is offline
    MemberRank
    Jun 2016 Join Date
    RussianLocation
    65Posts

    Re: Registration page php 7.2 + mongodb 1.5

    Quote Originally Posted by logankioma View Post
    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
    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

  4. #4
    Valued Member logankioma is offline
    MemberRank
    Aug 2012 Join Date
    142Posts

    Re: Registration page php 7.2 + mongodb 1.5

    Quote Originally Posted by Ulkyome Dev View Post
    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

  5. #5
    Member Ulkyome Dev is offline
    MemberRank
    Jun 2016 Join Date
    RussianLocation
    65Posts

    Re: Registration page php 7.2 + mongodb 1.5

    Quote Originally Posted by logankioma View Post
    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?

  6. #6
    Valued Member logankioma is offline
    MemberRank
    Aug 2012 Join Date
    142Posts

    Re: Registration page php 7.2 + mongodb 1.5

    Quote Originally Posted by Ulkyome Dev View Post
    do you have a library in php mongodb?
    Yes I have

  7. #7
    Member Ulkyome Dev is offline
    MemberRank
    Jun 2016 Join Date
    RussianLocation
    65Posts

    Re: Registration page php 7.2 + mongodb 1.5

    Quote Originally Posted by logankioma View Post
    Yes I have
    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.

  8. #8
    Valued Member logankioma is offline
    MemberRank
    Aug 2012 Join Date
    142Posts

    Re: Registration page php 7.2 + mongodb 1.5

    I use localhost

    - - - Updated - - -

    Quote Originally Posted by Ulkyome Dev View Post
    check the library load https://pastebin.com/kd3UjNCC

    scroll down and find the ->
    I changed php, I put php 7.1 the extension mongoDB and it does not work, of the same error

  9. #9
    Member Ulkyome Dev is offline
    MemberRank
    Jun 2016 Join Date
    RussianLocation
    65Posts

    Re: Registration page php 7.2 + mongodb 1.5

    Quote Originally Posted by logankioma View Post
    I use localhost

    - - - Updated - - -



    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

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

  10. #10
    Valued Member logankioma is offline
    MemberRank
    Aug 2012 Join Date
    142Posts

    Re: Registration page php 7.2 + mongodb 1.5

    Quote Originally Posted by Ulkyome Dev View Post
    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/pe...s-vc15-x64.zip
    Note that the mongo library is under version php 7.2
    Do not you use appserv x64?

    - - - Updated - - -

    Quote Originally Posted by logankioma View Post
    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

  11. #11
    Member Ulkyome Dev is offline
    MemberRank
    Jun 2016 Join Date
    RussianLocation
    65Posts

    Re: Registration page php 7.2 + mongodb 1.5

    Quote Originally Posted by logankioma View Post
    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
    now are swearing at the fact that authorization with an error, the server mongodb you have enabled authorization?

  12. #12
    Valued Member logankioma is offline
    MemberRank
    Aug 2012 Join Date
    142Posts

    Re: Registration page php 7.2 + mongodb 1.5

    Quote Originally Posted by Ulkyome Dev View Post
    now are swearing at the fact that authorization with an error, the server mongodb you have enabled authorization?
    Where do I do this? I'm lost here!

  13. #13
    Member Ulkyome Dev is offline
    MemberRank
    Jun 2016 Join Date
    RussianLocation
    65Posts

    Re: Registration page php 7.2 + mongodb 1.5

    Quote Originally Posted by logankioma View Post
    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

  14. #14
    Apprentice xcruci is offline
    MemberRank
    Sep 2018 Join Date
    10Posts

    Re: Registration page php 7.2 + mongodb 1.5

    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

  15. #15
    Valued Member logankioma is offline
    MemberRank
    Aug 2012 Join Date
    142Posts

    Re: Registration page php 7.2 + mongodb 1.5

    Quote Originally Posted by xcruci View Post
    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
    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



Advertisement