ID:               49130
 Comment by:       sjoerd-php at linuxonly dot nl
 Reported By:      adam at elishome dot org
 Status:           Open
 Bug Type:         hash related
 Operating System: freebsd
 PHP Version:      5.2.10
 New Comment:

Thank you for your bug report.

Since I could not reproduce it, I have some questions for you. Can you
reproduce the problem on a system with another OS? Is the output of
php-5.2.10 sha1_file consistent for a given file, or does it give a
different output each time? Can you supply an example file which gives a
wrong hash, with both the good and the wrong hash?


Previous Comments:
------------------------------------------------------------------------

[2009-08-01 10:47:26] adam at elishome dot org

Description:
------------
The value returned for the sha1_file() function is not reliable.

The sha1_file function's result in PHP 5.2.10 is not the same as the
sha1 value returned by the freebsd system, or by ruby's sha1 function.

PHP 5.2.9 always returns the correct sha1 values, but 5.2.10 does not. 
It occasionally gets it right, but the large majority of the time it is
incorrect.

Reproduce code:
---------------
Lookup a file's sha1 value using PHP 5.2.9 using the sha1_file function
(or using freebsd's system function, or using Ruby's sha1 function), and
then compare it to the value returned by PHP 5.2.10's sha1_file
function.

Expected result:
----------------
I expect the sha1_file function to return correct values.

Actual result:
--------------
The values returned by sha1_file were not correct.


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=49130&edit=1

Reply via email to