Then.... include global.php at the beginning of your page before you set the variables?
Yes, this is the solution I ended up using, though it's a bit of a pain because previously it was in my header include; now it has to be inserted at the top of every page by itself.