Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

There is no suitable CSPRNG installed on your system

Tags:

laravel-5

I have a problem with my laravel website while I am hosting it to online server it gets an error says

There is no suitable CSPRNG installed on your system

I searched the question. But I found nothing that helps me. Please if someone know how to handle this problem I will be so grateful. Thank you!

The program is coded with laravel 5 and php 7

like image 598
Hanif Formoly Avatar asked May 11 '16 03:05

Hanif Formoly


1 Answers

I also got surprised by this error after upgrading Symfony. Try this article, the first solution fortunately worked for me:

How to solve PHP 7.0 Polyfill : There is no suitable CSPRNG installed on your system - paragonie/random_compat:

Although you're not using directly this library, add it to your composer.json as a dependency. Require random_compat with the specific version 1.4:

{
    "require": {
        "paragonie/random_compat": "~1.4"
    },
}

Then run composer install (or composer-update if you're already using this library) and try to run your project again. If it didn't work try downgrading to 1.3, if it doesn't work neither, then i hope you have the rights to modify PHP settings in your server and go to the next possible solution.

like image 140
Czechnology Avatar answered Nov 23 '22 23:11

Czechnology