rmalzahn Posted August 26, 2012 Share Posted August 26, 2012 I just installed ver.2.3.3 and am getting the following warning: Warning: mcrypt_create_iv() [function.mcrypt-create-iv]: Cannot open source device in D:\Hosting\4374744\html\osc\catalog\includes\classes\passwordhash.php on line 70 This waring displays when trying to checkout after entering the userid and password. The checkout process can be completed without any problems other than this message displaying. There are also problems when trying to update quantites in the cart. The following message repeats a bunch of times: Warning: mcrypt_create_iv() [function.mcrypt-create-iv]: Cannot open source device in D:\Hosting\4374744\html\osc\catalog\includes\classes\passwordhash.php on line 70 Then the following message is displayed: Warning: Cannot modify header information - headers already sent by (output started at D:\Hosting\4374744\html\osc\catalog\includes\classes\passwordhash.php:70) in D:\Hosting\4374744\html\osc\catalog\includes\functions\general.php on line 49 at this point the application must be restarted. Any recommendations on how to proceed? Link to comment Share on other sites More sharing options...
rmalzahn Posted August 27, 2012 Author Share Posted August 27, 2012 Here is the section of code from passwordhash.php where the error is occuring: function get_random_bytes($count) { $output = ''; if (@@IS_readable('/dev/urandom') && ($fh = @fopen('/dev/urandom', 'rb'))) { if (function_exists('stream_set_read_buffer')) { stream_set_read_buffer($fh, 0); } $output = fread($fh, $count); fclose($fh); } elseif ( function_exists('openssl_random_pseudo_bytes') ) { $output = openssl_random_pseudo_bytes($count, $orpb_secure); if ( $orpb_secure != true ) { $output = ''; } } elseif (defined('MCRYPT_DEV_URANDOM')) { $output = mcrypt_create_iv($count, MCRYPT_DEV_URANDOM); <----This is line 70 ????????? } Link to comment Share on other sites More sharing options...
♥kymation Posted August 27, 2012 Share Posted August 27, 2012 All methods of creating a password hash are failing. This is dues to your server settings. Talk to your host about this. If they can't fix the problem, find a different host. Regards Jim See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
Harald Ponce de Leon Posted August 27, 2012 Share Posted August 27, 2012 There's a bug report about this here: http://www.oscommerce.com/forums/tracker/issue-483-phpass-and-mcrypt-create-iv/ , osCommerce Link to comment Share on other sites More sharing options...
lachitmonstar Posted December 2, 2012 Share Posted December 2, 2012 Change.... catalog/includes/classes/passwordhash.php from: $output = mcrypt_create_iv($count, MCRYPT_DEV_URANDOM); to: $output = mcrypt_create_iv($count, MCRYPT_RAND); Hope, It will solved the problem. Lachit Kashyap Link to comment Share on other sites More sharing options...
FANSHILONG Posted June 9, 2013 Share Posted June 9, 2013 Change.... catalog/includes/classes/passwordhash.php from: $output = mcrypt_create_iv($count, MCRYPT_DEV_URANDOM); to: $output = mcrypt_create_iv($count, MCRYPT_RAND); Hope, It will solved the problem. It works perfectly, thanks Bro Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.