Is there a way i can charge my iphone 5 while off?

Everytime i put it on charge it turns on, when it turns on it says the charger is not supported.
my phone was completely dead so when it was off it was charging fine its got to 20% and turned back on now saying the charger isn't supported, i've ordered a new charger but won't have it for a few days yet so for now the only option i have is to charge it off but it keeps turning on and not work, what can i do?

My friend had a simmilar issue with their iPad, it's still charging, just the phone doesn't recognize it, just set it down, and walk away.