From:             
Operating system: Windows 7
PHP version:      5.4SVN-2011-07-09 (snap)
Package:          mcrypt related
Bug Type:         Bug
Bug description:mcrypt_create_iv always fails to gather sufficient random data

Description:
------------
When using the 5.4 snaps calling mcrypt_create_iv with either
MCRYPT_DEV_RANDOM or MCRYPT_DEV_URANDOM as source always fails to gather
sufficient random data regardless of the specified size.

(Could be related: http://svn.php.net/viewvc?view=revision&revision=312201
)

Test script:
---------------
<?php var_dump(mcrypt_create_iv(1, MCRYPT_DEV_URANDOM));

Expected result:
----------------
string 'm' (length=1)
[or similar]

Actual result:
--------------
Fatal error: mcrypt_create_iv() [<a
href='function.mcrypt-create-iv'>function.mcrypt-create-iv</a>]: Could not
gather sufficient random data in D:\htdocs\stack\quick.php on line 3

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

Reply via email to