Updates to make the db work externally -- confirmed this works with symfony2