When I sync my iPhone to a new computer, will I lose contacts and photos?

It's not really a new computer, but my laptop broke so I got it repaired which meant formatting the hard drive and basically resetting the device to factory configuration.

I re-downloaded all my music so I'm going to sync the iPhone to my laptop to put it all on there, but will I lose my contacts and my photos and text messages that are currently on my phone? I haven't been able to back up my phone for about 2 months, by the way.

Also if I probably will lose everything, how can I back it up to iCloud and then put it back on?

I don't think so unless you try to synch it or something otherwise you should be fine BUT Itunes is a very stupid program so it maybe will…

No you will notion should only lose your music I'm pretty sure

No, you won't lose your contact or photos since those are actually saved onto your phone. The only thing the sync would remove would be your music and if you've purchased any apps and haven't backed thouse up it will also removed those, but you can get those back since they were purchased through the app store.