There is no suitable CSPRNG installed on your system - 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

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.

Have you tried these links
https://github.com/paragonie/random_compat/issues/99
https://laracasts.com/discuss/channels/servers/there-is-no-suitable-csprng-installed-on-your-system
?
Seems like you are facing a similar issue.
Sorry for answering, and not commenting. I don't have enough reputation yet to comment!

Related

Cypress freezing (Your tests are loading)

Cypress for me is often stuck in the "Your tests are loading" screen. I am really confused as to why it happens, and restarting Firefox/crome doesn't help either. It doesn't depend on any code, happens completely randomly and today my luck was down so I was looking more at that then at my code. any help is welcome, and thank you in advance.
Late reply, but are you using webpack-preprocessor? I am and the same issue happened to me when I upgraded to Webpack 5 lately.
The solution was to downgrade to Webpack 4.
In this case it is a known issue, there is an open Pull Request on Cypress github that should hopefully fix it: https://github.com/cypress-io/cypress/pull/15611
If you're coding a project that's using another version and you install the project without using nvm use it will install the latest dependencies which may break the code that doesn't support the new dependencies version.
Check the original code Webpack version and be sure it is the same installed locally

Class 'Illuminate\Routing\ControllerServiceProvider' not found While Upgrading from Laravel 5.1 to 5.2

I have a Laravel 5.1 install that I am upgrading. I meticulously followed the instructions available at https://laravel.com/docs/5.3/upgrade#upgrade-5.2.0 for the upgrade, including removing Illuminate\Foundation\Providers\ArtisanServiceProvider and Illuminate\Routing\ControllerServiceProvider from the config/app.php file (I am stressing this point, as googling for this issue has suggested this in every response).
Despite this, I am still getting this error when I run composer cache:clear
[Symfony\Component\Debug\Exception\FatalThrowableError]
Class 'Illuminate\Routing\ControllerServiceProvider' not found error
and see this error in my browser:
FatalThrowableError in ProviderRepository.php line 146:
Class 'Illuminate\Routing\ControllerServiceProvider' not found
Thinking that perhaps references to these classes were being cached, I checked bootstrap/cache/services.json and removed the references from there as well and then ran composer dump-autoload but I am still getting this error.
I also made sure to copy over example config/app.php from Laravel 5.2 clean install example here: https://raw.githubusercontent.com/ziyed/Laravel-5.2/master/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php
I have read through the similar threads on StackOverflow and Laracast and tried tried to use the advice contained inside, but nothing seems to work.
Any help would be greatly appreciated. For reference, my dev setup is running on a local XAMPP stack under a Windows 10 OS. The other environments are remote, using a traditional LAMP stack with Amazon Linux 2. I was trying to do the upgrade locally.
Illuminate\Routing\ControllerServiceProvider is not present anymore.
When I recently had to upgrade the same versions as you, I had to run composer update before and after removing Illuminate\Routing\ControllerServiceProvider::class and Illuminate\Foundation\Providers\ArtisanServiceProvider::class to make it work. Also worth to mention you need to clear bootstrap/cache. It worked for me.
Edit: i noticed now you tried the last step partially as well. You can remove all php files from cache.
I am closing this question, not because I found an answer, but because continuing down this path just didn't pass a cost/benefit analysis. After upgrading to 5.2, the next upgrade would be 5.3, and the breaking changes between 5.2 to 5.3 is a lot higher than between 5.1 to 5.2. After some thought, it was obvious that the better approach would be a fresh install on my target version, and then start porting over each module in my project by copying over the views, updating the routing, and making changes to the controllers and middleware as needed.
Or just using Laravel Shift.
Thank you to everyone who chimed in with suggestions!

Upgrading a laravel 5.4 project to laravel 7

Is it even worth it upgrading a laravel 5.4 project to laravel 7 which includes many packages ?
Do I have to upgrade it manually version after version or is there any tool that might help with the migration ?
Thank you for all the answers.
By upgrading one version at time, it will be easier to fix and change whats needs to be changed.
Here is how I did:
https://laravel.com/docs/5.5/upgrade
Follow the guide
Change the code
Test your code
https://laravel.com/docs/5.6/upgrade
Follow the guide
Change the code
Test your code
And so on.
Depends on the size of your project. Go to the github pages of your third party packages to check if they have updated as well. You can always change the package.
It will be a pain in the ass, but it's possible.
(Don't forget the php version.)
Good luck!

How to install php-v8js on window

Now, i using vuejs and laravel. when i see view page source (Ctrl+U) but have not html code.I went to find in google.And found need to use Server side rendering
(I learned form https://medium.com/js-dojo/server-side-rendering-with-laravel-vue-js-2-5-6afedd64aa90) But problem is "Class 'V8Js' not found"
Someone can help ?
sorry I don't speak English that well
The problem is, that V8JS is a PHP library, that is not shipped by default and you have to compile it by yourself. You can learn more about it and how to install it on it's GitHub page. Follow the installation instructions for your local machine operating system and you should be good to go. If you would like to deploy your app to your hosting provider, first you have to make sure that your host has this PHP extension compiled and enabled. Hopefully this helps you :)

ocramius/proxy-manager dont work with php 7.0.12

i have some error with my application symfony. one error is Unsupported declare 'strict_types'. Please help me to resolve that.
My php version is 7.0.12
My symphony version is 2.7.16
My Ocramius/proxy-manager version is 2.0.3
this is the link to my server : http://www.kossa.cm
I actually encounter the exact same issue and the only ugly fix I could find to just pass through (without fixing it) is to remove that vendor/ocramius/proxy-manager folder and do not run a composer update (that would install the proxy-manager back).
As I said, it is not a proper fix, I'm trying to solve it now.
If you found any kind of information about it, please share it with us ;)
--Edit-- Are you using wamp ?
to solve your problem, downgrade your php version to 5.6, because ocramius is not compatible for the momment with php 7.0 and above!

Resources