How to connect to database Openshift with Silex

I want to connect my silex Application to my Database with Openshift,

So i have these lines in my file bootstrap.php

  • Transferring changes from a dev DB to a production DB
  • How can I use Git with different database configurations between developers?
  • PHP - Database schema: version control, branching, migrations
  • Put MySQL database under version control?
  • Verify database changes (version-control)
  • Is there a way to actually save a mySQL database to Github?
  • define('DB_HOST', getenv('OPENSHIFT_MYSQL_DB_HOST'));
    define('DB_PORT', getenv('OPENSHIFT_MYSQL_DB_PORT'));
    define('DB_USER', getenv('OPENSHIFT_MYSQL_DB_USERNAME'));
    define('DB_PASS', getenv('OPENSHIFT_MYSQL_DB_PASSWORD'));
    define('DB_NAME', getenv('OPENSHIFT_GEAR_NAME'));
    App::$app->register(new Silex\Provider\DoctrineServiceProvider(), array(
        'db.options' => array(
            'driver' => 'pdo_mysql',
            'host' => constant("DB_HOST"),
            'dbname' => constant("DB_NAME"),
            'user' => constant("DB_USER"),
            'password' => constant("DB_PASS"),
            'port' => constant("DB_PORT"),

    I call several working services

    And the website work in Local (with local connection)

    When i push with git i have this error in my logs (when i update the website) :

    [Mon Dec 22 08:10:17 2014] [error] [client] PHP Fatal error:  Clas
    s 'Doctrine\\DBAL\\Configuration' not found in /var/lib/openshift/548b027efcf933
    erviceProvider.php on line 90

    Thanks for your help.

  • Running github for windows powershell on remote server
  • How to delete everything inside GIT repository?
  • What's a good way (or tool) to version control a SQLite database (schema only)?
  • git commit can't find (global) config running in cron job
  • Tagging an Android Release
  • Git - How can I get a file's history added to another file… or something
  • Git Baby is a git and github fan, let's start git clone.