Is there anything I can change in php.ini that includes a php file before running any other file? Equivalent to adding "require ('somefile.php"); before each file?
You can use the directive auto_prepend_file.
auto_prepend_file
Search auto_prepend_file = [path/to/file]in php.ini. Replace with [path/to/file]your file
auto_prepend_file = [path/to/file]
[path/to/file]