I also had this problem except not as much foam as you describe, but I had an inconsistency in my bottles. I poured in the priming sugar mixture, after boiling, into the bottling bucket and then siphoned on top of that. Then I slowly and gently stirred to give it a proper mixture. I then stirred occasionally while bottling (every 12 pack or so). This should help with your inconsistent carbonation.
"Remember, the only way to really F up your beer is to replace your yeast with ketchup." - NineMilBill
Primary: Victory Hop Devil IPA
Bottled: Delirium Tremens
Bottled: Black Dog Ale