I have successfully uploaded the yii template application to OpenShift and added the MongoDB (version 2.2) service to my app. However I don't seem to be able to make the connection.
OpenShift give me the following information (slightly changed here for security):
This is what I have added to the main.php file
I have been able to get this working locally but cannot connect once uploaded to the host service. Any ideas what I'm doing wrong? This is the message i get from the server...
OpenShift give me the following information (slightly changed here for security):
MongoDB 2.2 database added. Please make note of these credentials: Root User: admin Root Password: 3Uhu78sikjat Database Name: newmdb Connection URL: mongodb://$OPENSHIFT_MONGODB_DB_HOST:$OPENSHIFT_MONGODB_DB_PORT/
This is what I have added to the main.php file
'mongodb' => array( 'class' => 'EMongoClient', 'server' => 'mongodb://admin:3Uhu78sikjat@$OPENSHIFT_MONGODB_DB_HOST:$OPENSHIFT_MONGODB_DB_PORT/', 'db' => 'newmdb' ),
I have been able to get this working locally but cannot connect once uploaded to the host service. Any ideas what I'm doing wrong? This is the message i get from the server...
Failed to connect to: $OPENSHIFT_MONGODB_DB_HOST:0: No such file or directory