I would like to know if someone knows more about the intricate details of the differences in the connector between an iPhone dock and iPod 4G dock?

The reason for my question is this:
I have an iPhone that immediately restarts after I turn it off. However, I discovered that when it is in an iPod 4G dock I can power it off and it stays off - but only when it is placed in this dock!

Also, placing it in the iPhone dock does not work -- in fact it complains that the iPhone dock is an incompatible accessory.

This all makes me conclude that there is probably something wrong with the connector of my iPhone (even though syncing is not a problem).

Any hints are welcome.