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
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
(orphp7.2-curl
) will install the missing dependency. You may need to enable the module after installing it usingphpenmod curl
. If you are using another Linux distribution, please consult the appropriate distribution documentation for installing PHP modules.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.