Are you using the same USB cable for both phones? If you are, please try a different data cable, as the problem may be with the cable. Also try charging on a different wall socket and computer.
If you are able to solve it, please let me know how you did it. :)