I bought my kegerator before i started brewing and kegging my own beer. Back then i didn't know the volumes of co2 in the kegs I bought. I would use the co2 volumes chart and set the regulator to what i thought was correct for the beer style, but still would get foamy pours. Then I came across a tip online that helped a lot. Look at the beer line right after pouring a beer. If you see bubbles coming from the coupler, your regulator is set too low and gas is escaping from the beer. In your case, if your regulator and temperature are correct, then it means your keg is over carbed.
Disconnect your gas line and shake the keg up a bit. Then pull the pressure relief valve to let some gas off. Do this a few times and then reconnect the gas line. Shake the keg until you stop hearing gas enter the keg. Then wait about a day for the pressured to balance and you should be fine.
I've changed my lines since buying my kegerator but kept then at the original 5 foot length. I never have problems with foamy pours. I'm sure longer lines might help but they won't fix an unbalanced keg. Good luck.