top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Deployment of mongodb in hostgator / godaddy?

+1 vote
772 views

I am able to run the web application using php and mongodb 3.2.6 in localhost.But I need to deploy mongodb in existed servers like Hostgator or Godaddy, then I need to run the php(5.4) web application.

Is it possible? Please suggest me to run my php application to connect mongodb?

posted Jun 23, 2016 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote

you need to add first php and mongodb on your server then get your php version by using phpinfo() and then run this script :

$ sudo apt-get install php5-mongo

to install php-mongo driver.
* if it doesn't work, go to mongo.ini file of mongo and add
extension=mongo.so

answer Jun 26, 2016 by Shivam Kumar Pandey
Similar Questions
0 votes

I see MongoDB Atlas launched the Freemium Service which is good. But When I logged in after choosing the Freemium, I dont have any option to add my database or build a new deployment. Any Idea why it is happening.

0 votes

I would like to understand what is the most common architecture deployed with MongoDB.
For example, what kind of deployment is most common:
( a ) Sharded Clusters
( b ) Replica Set (no shards) with [ n ] members

I understand that a shard cluster is the way to go to scale-out your database, but what would be the performance breakdown to start a sharded cluster?

Do you recommend to start a database as sharded database?

+3 votes

I am very new to mongodb, my requirement is need to search a value in two fields. ex: first_name, last_name

I am using PHP as serverside and mongodb as backend.

Can you please suggest, How can I write the query in PHP.

Below is the things, I tried to implement but not succeeded.

db.users.aggregate(
  [
  { $project: { userName: { $concat: [ "$first_name", " - ", "$last_name" ] } } }
  ]
)
+1 vote

I recently upgraded the latest PHP driver and could do an "explain" query by using the "$explain" modifier when executing the query, however as of MongoDB 3.2 the operator was removed so this is no longer possible.

So my question is how can I do an explain query with the new driver and MongoDB 3.2?

...