fuel pump hose or pump failure on 2001 BMW 525i

when turning on ignitian gas starts flowing freely from rear of engine and car will turn over but not start. could this be fuel pump failure or a torn hose to or from fuel pump

Asked by for the 2001 BMW 525i
if its pumping gas on the ground the pump is working.check the hoses