Reputation: 475
I am getting fatal error random_bytes() in laravel 5 after installing the "paypal/adaptivepayments-sdk-php":"v3.6.106" in composer.json
"require": {
"laravel/framework": "5.0.*",
"jacopo/laravel-authentication-acl": "1.3.*",
"webpatser/laravel-countries": "dev-master",
"yajra/laravel-datatables-oracle": "~5.0",
"illuminate/html": "5.0.*@dev",
"paypal/adaptivepayments-sdk-php":"v3.6.106"
},
using composer. please share me any solution . i am stuck for last 3 hrs to solve this error.
i tried to comment the nextBytes() in secureRandom.php file but i think it is not a good idea.
Upvotes: 0
Views: 127
Reputation: 15457
random_bytes
is a PHP function in PHP v7.0. You can install the missing package on PHP v5.x using composer.
Run composer require paragonie/random_compat
and then try adding the affected library.
Source: https://github.com/paragonie/random_compat
Upvotes: 2