Without seeing the code, it will be extremely difficult to pinpoint the issue for you.
If you have a text editor that can search through multiple files (open or closed) then I would do a simple search for $root_host and just peruse that list to see if it's contained in a header() call.
In linux you could do a 'grep -iR "\$root_host" *' to search all files of a directory for that phrase.