Answer the question
In order to leave comments, you need to log in
Symfony 3.0.3 How to resolve "There is no suitable CSPRNG installed on your system" error?
Hi all! Need help fixing the error. Maybe someone came across.
Couldn't pinpoint exactly at what point (updating the sources to the latest version and/or manipulating the server and/or updating Symfony) this error appeared, but I noticed that everything worked fine before clearing the cookies.
Twig_Error_Runtime in classes.php line 4797:
An exception has been thrown during the rendering of a template ("There is no suitable CSPRNG installed on your system") in "UserBundle:Security:login_inline.html.twig" at line 45.
<input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}" />
CentOS Linux release 7.2.1511 (Core)
$ uname -a
Linux ovvio.pro 3.10.0-327.10.1.el7.x86_64 #1 SMP Tue Feb 16 17:03:50 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
$ php - v
PHP 5.6.19 (cli) (built: Mar 4 2016 23:38:37)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
with Zend OPcache v7. 0.6-dev, Copyright (c) 1999-2016, by Zend Technologies
Answer the question
In order to leave comments, you need to log in
php.net/manual/ru/function.random-bytes.php
This is the function he wants, but it is only in PHP7.
The author of the "paragonie/random_compat" package seems to have broken it a bit.
In composer.json
instead of "paragonie/random_compat": "1.3.*"
fallback to "paragonie/random_compat": "1.2.*"
or try installing php5-mbstring if you don't already have it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question