I'm pretty new to PHP but I've been programing mod_perl for a few years now. In mod_perl you can execute code or preload code in a specified startup file. Is there a way to do the same for PHP?
I'm not familiar with mod_perl, but it sounds like what you want can be done with the auto_prepend_file configuration directive.
There is an entry describing it here: http://www.php.net/manual/en/configuration.directives.php