title: Magento - Using custom Environment Variables for sensitive database info
body: <p>I know Magento stores the database connection details within the <code>local.xml</code> file, however our firm is trying to avoid passwords and other sensitive data being stored within our git repo's for security purposes.</p>
  
  <p>I know you can create Environment Variables easily via an <code>.htaccess</code> file, but I'm hoping to find a workable solution that will enable me to set this database information dynamically from a environment variable.</p>
  
  <p>As the <code>local.xml</code> is an XML file and as this is a non dynamic/server-side filetype we cannot use it to read environment variables.</p>
  
  <p>Would there be a way to somehow add in some hook/custom behaviour to Magento in which I could replace the <code>local.xml</code> with a PHP file that will allow me to pull in these environment variables?</p>
  
  <p>So in a sense, the <code>local.XML</code> would become a <code>local.PHP</code> file with the ability to read my own custom environment variables such <code>DB_HOST, DB_USERNAME, DB_PASSWORD</code> rather than having them already set in the xml file as <code>localhost, root, password123</code> etc.</p>
  
  <p>Any ideas on how best to achieve this, or are there any existing Magento add-ons/extensions/mods that will allow me to do this?</p>