To determine whether acute ionized hypomagnesemia and hypocalcemia immediately following foscarnet infusions can be lessened or eliminated by prior infusion of magnesium sulfate. To determine whether reductions in ionized magnesium, ionized calcium, and parathyroid hormone levels following foscarnet infusions are lessened by preinfusion of magnesium sulfate. To evaluate the safety of intravenous magnesium sulfate prior to foscarnet infusion by monitoring blood pressure, heart rate, and heart rhythm. To characterize the effect of magnesium sulfate on foscarnet blood levels and urinary excretion of calcium, magnesium, phosphate, and foscarnet.