I found the solution in my case
--------------------------------------------------------------------------------
My 3g iPhone would not come on unless plugged in to a computer and only gave the apple screen when it was. I was getting the code 23 in both recovery and DFU mode. I tried multiple computers and operating systems and still got the error. If i had thought about it unstead of being stressed I would have figured out the solution much faster.
Code 23 is an error connecting to Itunes so the best way is to narrow down what coule be causing the problem.
#1 Itunes corrupt software
#2 Corrupt USB drivers or a bad usb port.
#3 A bad iPhone usb cable
#4 A bad data port on the iPhone the cable was connecting to (This was my problem).
I also replaced the battery when I broke it down this far and I doubt this was part of the problem but, when I did replace it and the data port everything was fine again.
I tried many different things and started to catch on when using iTunnel and winscp and it would lose connection.
I wish you all the best of luck finding the answer to your problem and hope this helps someone else out there.