Answer the question
In order to leave comments, you need to log in
Why is the file checksum different on different OS?
Good afternoon. Using the md5_file function in PHP, I get the checksum of the file, but I noticed that on Windows 7 x86 and OSX, the function gives me different hashes. How can this be and what is it connected with?
Answer the question
In order to leave comments, you need to log in
Windows and Linux has different line endings, \r\n and \n. So when the file is read, the content of files is different.
First you need to understand whether the correct hash is issued at all. md5deep filename and compare with PHP results.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question