Potty training

Hello ! So, we are currently potty training our 2.5 yr old. He'll go pee now and then in his potty ,but won't poop in it. Aside from that he's been going 4-5 days without pooping and will say his tummy hurts. Did this happen with any of your children during potty training? I took him to the pediatrician Tuesday of this week and they gave me pedia lax. I did half the bottle and let me tell you.... within 30 mins it was all liquid in his pull up. His diet hasn't changed and he was typically an every other day to 2 days going poop ,prior to potty training. He's also taking fiber gummies recommended by his doc and that was started Thursday and his last bm was tues after the pedia lax...HELP!! LOL