Infants on an all-milk diet after normal weaning time may develop hard stools because milk contains no fiber. Adding cereal or fruit to the diet usually helps. When a child has a bout of illness that lowers the amount of food and drink consumed, constipation often follows as a result of too little fluid in the diet. Lack of appetite is difficult to counter in a child, but it may be possible to tempt the child to drink a fluid usually forbidden or kept as a treat, such as a soft drink. People who have hemorrhoids may become constipated because they fear the pain that can accompany defecation during a hemorrhoid flare-up.
Fear of pain can also be a factor for patients with an anal fissure - a small tear in the anus.
In either case thoughts about the pain may cause a person to ignore the urge to defecate and so bring on constipation. Any disruption of normal bowel routine, while traveling, for instance, could result in constipation. Stress may also cause this problem. Sometimes constipation is a side effect of prescription medications. A few people suffer alternating bouts of constipation and diarrhea , a condition due to irritable bowel syndrome .