ID:               49130
 Updated by:       scott...@php.net
 Reported By:      adam at elishome dot org
-Status:           Open
+Status:           Feedback
 Bug Type:         hash related
 Operating System: freebsd
 PHP Version:      5.2.10
 New Comment:

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.

I can't reproduce this.

Nothing in the sha code has changed in 2+ years.


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

[2009-08-13 09:56:27] sjoerd-php at linuxonly dot nl

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?

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

[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