skip to Main Content

I added Paypal Express checkout plugin to my website.
I get this error:

2019-07-23T15:45:32+00:00 CRITICAL Uncaught Error: Call to undefined
function PayPalCorecurl_version() in
/var/www/html/wp-content/plugins/woo-paypal-express-checkout/includes/php-library/paypal-rest/lib/PayPal/Core/PayPalHttpConfig.php:65

and this is the line

$curl = curl_version();

What can I do to resolve this probleme
I tried to install php-curl but I always got the same result
I used

sudo apt-get install php5-curl
sudo service apache2 restart

2

Answers


  1. It sounds like you are missing the PHP CURL extension. This is usually bundled as a separate package. If you are using Ubuntu, apt-get install php-curl (or php7.2-curl) will install the missing dependency. You may need to enable the module after installing it using phpenmod curl. If you are using another Linux distribution, please consult the appropriate distribution documentation for installing PHP modules.

    Login or Signup to reply.
  2. First, check your active PHP version, maybe there are multiple PHP versions installed on the server. In that case, you have to look for an active PHP version running on the server. Use phpinfo(); to check PHP version. Then run the command as per your PHP version. In my case, it was PHP 7.3.

    $ sudo apt-get install php7.3-curl
    $ sudo service apache2 restart
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search