Skip to content
Advertisement

Tag: mongodb

Mongodb php datetime filter not working properly

I use mongo db with php I need a last 1 hour data. I implement as like bellow. PHP CODE I need a count result. thanks in advance Answer I am not so familiar with PHP, but I think $client->$db_name is equal to $client->selectDatabase($db_name) However -> does not work with variables, so $client->$db_name may fail. Try this one: I never

php mongodb validate form password

This is my first time using mongodb with php and I have a register and a login form . When a user registers I succesfully hash his password using password_hash() php function and insert it in a …

MongoDB Authentication Required?

I just started looking into MongoDB for some projects I’m working on. Reviewing the documentation I came across some PHP snippets that show how to connect and query and so on. One thing I’ve been having trouble finding is Authentication use case. A lot of the information I’ve found the uses the connect method don’t have authentication methods when connecting

Fail install mongodb on Centos 7 with Package error

I try to install mongodb to Centos 7 server with PHP. I follow the install guide from https://www.php.net/manual/en/mongodb.installation.pecl.php But sudo pecl install mongodb show error message: As the error message recommded, I install php-devel package by But I got a lot of Dependency error: Below are the server details, any solution? yum repolist rpm -q centos-release php –version Answer remi-php73

Laravel Lumen 5.7, debugbar throw Call to a member function listen on null

I’m trying to use the debugbar with lumen and jenssegers/laravel-mongodb , it wasn’t showing the database queries so I enabled. DB::connection(‘mongodb’)->enableQueryLog(); But now it shows this error. `Call to a member function listen() on null in LaravelDebugbar.php line 354` Another thing is that it only displays the debugbar on the home URL /, other than home URL it doesn’t display the debugbar.

Advertisement