Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

passwordhash.php Warning


rmalzahn

Recommended Posts

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

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

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

  • 3 months later...

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

  • 6 months later...

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...