It doesn't matter if Phaedra Parks is longtime pals with the guy accused of threatening her with a bomb ... a judge says he still has to stay away from her.
Terence Cook, best known as the rapper, Drama ... was released on a $25,000 bond last week with strict conditions while he's out of jail -- including not coming within 200 yards of Phaedra, her office or her crew. He also has to wear an ankle monitor, and get a mental evaluation.
The tight leash comes after Phaedra told TMZ ... Drama is an old friend and former client of hers, and the whole "bomb" incident was a huge misunderstanding. She says Drama was dropping off his mixtape, not a bomb.