Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Login Error #39

Closed
ghost opened this issue Mar 30, 2014 · 1 comment
Closed

Login Error #39

ghost opened this issue Mar 30, 2014 · 1 comment

Comments

@ghost
Copy link

ghost commented Mar 30, 2014

I can login to my administration session but when i push login button this error show up to me

PHP warning

mcrypt_create_iv() [function.mcrypt-create-iv]: Cannot open source device

C:\Web\www\sourcebans\framework\base\CSecurityManager.php(373)

361 */
362 public function generateRandomBytes($length,$cryptographicallyStrong=true)
363 {
364 $bytes='';
365 if(function_exists('openssl_random_pseudo_bytes'))
366 {
367 $bytes=openssl_random_pseudo_bytes($length,$strong);
368 if($this->strlen($bytes)>=$length && ($strong || !$cryptographicallyStrong))
369 return $this->substr($bytes,0,$length);
370 }
371
372 if(function_exists('mcrypt_create_iv') &&
373 ($bytes=mcrypt_create_iv($length, MCRYPT_DEV_URANDOM))!==false &&
374 $this->strlen($bytes)>=$length)
375 {
376 return $this->substr($bytes,0,$length);
377 }
378
379 if(($file=@fopen('/dev/urandom','rb'))!==false &&
380 ($bytes=@fread($file,$length))!==false &&
381 (fclose($file) || true) &&
382 $this->strlen($bytes)>=$length)
383 {
384 return $this->substr($bytes,0,$length);
385 }
Stack Trace
#0

@ErikMinekus
Copy link
Member

I think that error can only occur on PHP 5.2. I had to upgrade the requirements to 5.3 for other stuff anyway, so I'm afraid you'll have to switch to that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant