Answer the question
In order to leave comments, you need to log in
http 500 error while setting up mongodb, anyone faced the same issue?
Good evening!
Setting up a new Debian 9 on a VDS server.
I plan to connect the database to cloud.mongodb
Installed php 7.0.3
Installed the php driver in this way
$ pecl install mongodb
$ echo "extension=mongodb.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`
$client = new MongoDB();
$client = new MongoDB('there is a row to the database');
Answer the question
In order to leave comments, you need to log in
Just turn on the PHP settings to display errors in the browser. And you will see what exactly happened in the PHP code (error 500 in 99.9% of cases is caused by PHP script errors).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question