Oil filter gasket blowing off when started on 2005 Subaru Impreza

First off forgive my ignorance on engines. My father in law has installed a new engine in my son's 2005 Subaru impreza. It fires up just fine, but it leaks massive amounts of oil from the oil filter. He put a different filter on it and it did the same thing. My father in law thinks it may be too much oil pressure that is blowing the gasket off the filter. Any help or suggestions would be much appreciated. The good thing we a 3 year/50K warranty on it.

Asked by for the 2005 Subaru Impreza
there is something wrong with either the filter or the way it was installed. take the filter off and make sure the seal ring on the bottom of the old filter somehow stuck to the filter housing. this would cause the new oil filter not to seal properly. just so you know, the
warranty is for defects, not self-inflicted damage! if you damage the engine, they will pay nothing.
Thanks for the fast reply, really do appreciate it. Will pass on to my father in law. Thanks again.

Just spoke to my father in law and there is no gasket stuck to the filter housing on the car, that is the first thing he checked for. Is there anyway of adjusting the oil pressure?