Your query strings aren't getting escaped properly before you pass them off to MySQL. It sounds like you may have magic_quotes enabled on the linux box, but not on win32. I'd suggest going through the php.ini's and making sure that all the x-platform settings match up.
Also, it's a good practise to always call addslashes() on text fields (TEXT, CHAR, VARCHAR, etc.) when creating the insert/update query and then stripslashes() on the returned data from a select query. Do that and you won't go wrong, your code will also be more portable since you will eliminate problems like this one.
-geoff