Well, i thought i had the perfect solution, but it turns out this probably won't work:
use auto_append_file for customers' virtualhosted site. append a phps include file, which would undefine, then redefine fopen to make sure the file was in the document root. apparently you can't redefine existing functions.
any ideas similar to this?