Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

md5 on static file is changing

Status
Not open for further replies.

theEclipse

Programmer
Dec 27, 1999
1,190
US
Hello,

I am working on a script that takes the md5 of files in a directory and stores them in a database with the filename. It is working fine, but on one particular file the md5 sum keeps changing. Every time I refresh the page in fact.

Does anybody know why this would happen?

Robert Carpenter
"You and I have need of the strongest spell that can be found to wake us from the evil enchantment of worldliness." - C.S. Lewis (The Weight of Glory)

robert (at) robertcarpenter (dot) net
 
This is strange
Do you use md5_file() function?
On what system you use it?
What is your PHP version?


gry online
 
ooh....I have not been using the md5_file function. I have been reading the file into a string and then md5ing the string with md5(). I bet md5_file() is faster.

I am running it on my test machine, winxp pro (ntfs) -> apache 2 -> php 5 .

something that is curious is that the function does return the same md5 for other files....only on this one specific does it morph.

Robert Carpenter
"You and I have need of the strongest spell that can be found to wake us from the evil enchantment of worldliness." - C.S. Lewis (The Weight of Glory)

robert (at) robertcarpenter (dot) net
 
itsa binary....but so are some of the other ones...



Robert Carpenter
"You and I have need of the strongest spell that can be found to wake us from the evil enchantment of worldliness." - C.S. Lewis (The Weight of Glory)

robert (at) robertcarpenter (dot) net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top