It's my understanding that settings in the config.php override any settings in the control panel.
Background: I have copied a site over so it runs from another domain (with the view of closing down the original site). I want both sites to use the same database so they display the same content but change the site's general configs and paths. If I changed paths (like theme path) in the control panel then that seems to affect the other site as I think these setting are stored in the DB.
Thanks