How would one configure db access for magento on AppFog

102 Views Asked by At

i am trying to deploy megnto php app to appfog, but I need to figure out how to update db connection configuration from env variables.

I know that db connection configured in xml file under "magento/app/etc/", I also know that I should store authentication related via env variables. Question is, how would I reference them from xml file and do I need to some how let magento know about it, so when application is initialized xml processed as php file, or there is magento specific way? Any pointers, suggestions?

1

There are 1 best solutions below

1
On

Appfog services are automatically configured internally and their configuration is accessed via environment variables:

Try this:

<?php
var_dump($_ENV["VCAP_SERVICES"]);
?>

It should give you all the connection values you will need.