From:             adam at elishome dot org
Operating system: freebsd
PHP version:      5.2.10
PHP Bug Type:     Unknown/Other Function
Bug description:  sha1_file returns incorrect/unpredictable values

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 bug report at http://bugs.php.net/?id=49130&edit=1
-- 
Try a snapshot (PHP 5.2):            
http://bugs.php.net/fix.php?id=49130&r=trysnapshot52
Try a snapshot (PHP 5.3):            
http://bugs.php.net/fix.php?id=49130&r=trysnapshot53
Try a snapshot (PHP 6.0):            
http://bugs.php.net/fix.php?id=49130&r=trysnapshot60
Fixed in SVN:                        
http://bugs.php.net/fix.php?id=49130&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=49130&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=49130&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=49130&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=49130&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=49130&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=49130&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=49130&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=49130&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=49130&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=49130&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=49130&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=49130&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=49130&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=49130&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=49130&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=49130&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=49130&r=mysqlcfg

Reply via email to