My iphone 4 only charges through docking station?

Recently my iphone 4 refuses to charge through a USB charger. I bought a wall charger and it worked fine for months then suddenly it said "charging is not supported with this accessory". I thought it was the charger so I tried another one and it said the same. If it doesn't say the message it will charge then suddenly stop then start again, constantly. Now it only charges through my docking station. If anyone could help I would much appreciate it.

Have you recently updated to iOS 7? If so this is because Apple (in their infinite wisdom…) have included in their iOS 7 software that only legit and authentic wires will work on your devices because of supposed viruses being put into cheap 3rd party chargers that can steal your personal details and/or break your device, this is why your docking station works because it probably uses an apple licensed charging component whereas your chargers might not, if the chargers are authentic then your phones charging contacts might have dust or something on them making the phone misread the charger and thus rejecting it, i hope this made sense.

Hope this helps, don't hesitate to contact me with any further or other questions you may have!