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
Post a Comment