I9500 rear camera

Hi every body,

My s4 i9500 suffer from rear camera problem; when I turn the camera on, and after few seconds, the camera works but it’s too hot and I’m obliged to turn it off. I tried to change the camera with another one of an I9505 but the phone showed the message ”camera failed” :confused:,
I ask please:
1- are the two camera models compatible? should I install any file first before connecting the I9505 camera instead of the I9500 camera?
2-how to prevent camera high temperature and damage?