PHP Fatal error: Call to undefined function random_bytes()

Fatal error: Call to undefined function League\OAuth2\Client\Provider\random_bytes() in /xero/vendor/league/oauth2-client/src/Provider/AbstractProvider.php on line 305

1 Answer

  1. random_bytes() was introduced with PHP 7 and your server php version is less than PHP 7. Thats why you got the error.

    How to Resolve:

    Upgrade the server PHP version to PHP 7 Or any upper versions like PHP 7.2 / PHP 7.3
    Changing the PHP Version:

    1. Log into cPanel.
    2. Click PHP Configuration in the Software section.
    3. Select the version of PHP you want to use from the dropdown.
    4. Click Update to save your php configuration.
    5. Check your changes by viewing your settings in a phpinfo page.
  2. Reply

Leave a Comment

izmir eskort - mersin eskort bayan - adana eskort - antalya eskort - eskort istanbul
Code Compiler Web Tools Contact