#44374 [Opn->WFx]: MD5_file HASH problem

From: Date: Fri, 11 Jul 2008 21:43:35 +0000
Subject: #44374 [Opn->WFx]: MD5_file HASH problem
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-126555@lists.php.net to get a copy of this message
ID: 44374 Updated by: jani@php.net Reported By: palo654 at hotmail dot com -Status: Open +Status: Wont fix Bug Type: *Encryption and hash functions Operating System: Linux Fedora PHP Version: 4.4.8 New Comment: 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 ready. Previous Comments: ------------------------------------------------------------------------ [2008-03-08 14:20:54] palo654 at hotmail dot com Description: ------------ 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"); md5_file($currentfile); ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=44374&edit=1

« previous php.bugs (#126555) next »