What I need to do is make both have the same header.
I can do this for a bit in HTML, but some elements are difficult and wont work on the mediawiki part. For example the inbox will not show new messages on mediawiki, only on phpfox.
How can I make 1 header for both sites using the phpfox header as the base and functional?
Well, you need to explain a bit more about what you are trying to acheive. Just the script names doesn't give a lot to go on. What script language are you using, what operating system, and what are you actually trying to do? Is it to present a web page perhaps?
If you can elabourate, then we might have a chance!
If you are literally wanting just one file to be the header code file, this could be difficult. You are going to have to find a common way to do the things you want that works with both sites. However, if the end result is that you want each site to have common headers from the user perspective, one that looks and operates the same, it might be easier to make two header files that are built to operate properly while looking the same to the user.