Magnesium can overcome hard-to-treat constipation but be very careful about the dose. Too much magnesium can cause diarrhea or be hard on the kidneys.
Fluid and fiber can help overcome constipation. Triphala from Ayurvedic medicine may help, as could avoiding foods that cause allergies.
A person who suffers constipation and diarrhea as a result of irritable bowel syndrome offers tips on how to manage them both.