service configuration ** // $services = getenv("VCAP_SERVICES"); $services_json = json_decode($services,true); $mysql_config = $services_json["mysql-5.1"][0]["credentials"]; // ** MySQL settings from resource descriptor ** // define('DB_NAME', $mysql_config["name"]); define('DB_USER', $mysql_config["user"]); define('DB_PASSWORD', $mysql_config["password"]); define('DB_HOST', $mysql_config["hostname"]); define('DB_PORT', $mysql_config["port"]); // ** MySQL settings from resource descriptor ** // $ af bind-service my-service my-app Tuesday, August 21, 12