I am new in Mongdb and integrating mongodb in my project. When I connect mongodb remote server in my local system and run the project locally it is working fine. All the queries are working well. But while connecting mongodb on live server it show
"HTTP ERROR 500"
Here is my line of code to connect to the mongodb server:
$conn = new MongoDB\Driver\Manager("mongodb://admin:dgdg4564@38.129.193.112:27010/?authSource=admin");
I am using the same line of code in local system and it is working properly. I also created separate file and add the above line of code and print it but it shows blank screen. Why this is happening. How I should connect to mongodb remote server from live server. Any help will be appreciated.