MD5 hash calculates differently on server
Different compilers can have different levels of standard compliance. If you run into a sub-standard compiler you can have hard times seeing that well-tested code has been compiled to something working entirely different.
It can also happen that the target system is 64-bit and the code has 64-bit portability issues.
The only way to solve the problem is to debug where exactly the two versions of your code behave differently.