It sounds like the 25 psi is WAY too high if the keg is cold, so it'd be overcarbed. What was the temperature of the keg, and how long was it at 25 psi? My kegs in the kegerator are set at 12 psi, for about 2.6 volumes of co2. My lines are 8-10' long. I don't have any foaming when I bottle from the keg.
I assume that your keg is just overcarbed, or too warm.