An unknown error occurred (9)

Hello everyone,
I just recently bought an iPhone 3gs. Everything has been working fine over the past two weeks. Then, last night, I plugged the iPhone into my Mac to sync it. Then, as it was syncing, it went to the Apple logo.
I immediately went online to try and find a solution, but unfortunately none of the solutions on the forums have fixed my problem.
The first thing I tried was a restore, which constantly gave me the message "The iPhone "iPhone" could not be restored. An unknown error occurred (9)".
I read up on the error code at the Apple website, which defines it as such:
"This error occurs when the device unexpectedly drops off of the USB bus and communication stops. This can occur if the device is manually disconnected during the restore process. This issue can be resolved by performing USB isolation troubleshooting, using a different USB dock connector cable, trying another USB port, restoring on another computer, or by eliminating conflicts from third-party security software."
I've tried two separate iphone / ipod cables. I've also tried every usb port on both my mac and macbook. The same error every time.
Then I tried using RecBoot, which takes me out of the iTunes sync mode, but then gets stuck on the same old apple logo screen.
Then I read about how sometimes you can get an iPhone to restore properly on a different operating system so I tried Windows XP on a PC and got a completely different error message: "the iPhone "iPhone" could not be restored. The disk you are attempting to use is full."
I've lost sleep and spent my entire day off just trying to fix the problem. Any help would be appreciated.


There's advice in the following document on the 9:
iTunes: Specific update-and-restore error messages and advanced troubleshooting
For information on "USB isolation troubleshooting", see the 3. Disconnect other USB devices section of the following document:
iOS: Resolving update and restore alert messages