php - Check mongodb status before executeQuery() -




i may have simple problem don't know how resolve it. i'm using mongodb php, , every time go webpage have query on mongodb, error show (silex error) :

whoops, looks went wrong.

but no log in error.log of apache. happen when mongodb status :

● mongodb.service [...] active: inactive (dead)

when start mongodb mongod work.

i able handle possible problem. try (already tried no effect) on line :

$cursor = $mongo->executequery('books.authors', $query); 

question : how can handle error if mongodb inactive or not started ?





wiki

Comments

Popular posts from this blog

Asterisk AGI Python Script to Dialplan does not work -

python - Read npy file directly from S3 StreamingBody -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -