|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #44374 MD5_file HASH problem
Submitted: 2008-03-08 14:20 UTC Modified: 2008-07-11 21:43 UTC
Avg. Score:4.0 ± 1.0
Reproduced:2 of 2 (100.0%)
Same Version:0 (0.0%)
Same OS:2 (100.0%)
From: palo654 at hotmail dot com Assigned:
Status: Wont fix Package: *Encryption and hash functions
PHP Version: 4.4.8 OS: Linux Fedora
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: palo654 at hotmail dot com
New email:
PHP Version: OS:


 [2008-03-08 14:20 UTC] palo654 at hotmail dot com
I've noticed a really confusing fact.
MD5_file and shell md5sum gives different checksums in some cases.

I've written a complete file integrity check in php.
O was using md5sum from shell to calcullate md5 checksums. After switching to md5_file i've got allerts in some files.
So I made some test, and found, that in some cases md5sum and md5_file gives different output !!!
on my /usr/lib directory I've got 6 differences.

Reproduce code:
shell_exec("/usr/bin/md5sum $currentfile");


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2008-07-11 21:43 UTC]
We are sorry, but we can not support PHP 4 related problems anymore.
Momentum is gathering for PHP 6, and we think supporting PHP 4 will
lead to a waste of resources which we want to put into getting PHP 6

PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Thu Dec 01 20:05:53 2022 UTC