Call to undefined function curl_version

Viewed 13784

Hi I have installed wordpress 4.6 site on ubuntu 14.04 running php 5.6.

The admin page is not visible and i can see below error in logs :-

Fatal error: Call to undefined function curl_version() in /var/www/html/files/modules/postie/postie.php on line 274

How do i fix this?

I have verified that curl and php5-curl are installed on our server :-

ubuntu@ip-172-39-6-147:/var/www/html$ sudo apt-get install curl
Reading package lists... Done
Building dependency tree       
Reading state information... Done
curl is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 137 not upgraded.
ubuntu@ip-172-39-6-147:/var/www/html$ sudo apt-get install php5-curl
Reading package lists... Done
Building dependency tree       
Reading state information... Done
php5-curl is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 137 not upgraded.
3 Answers

I know it is a bit late, but for anyone struggling, i found a solution to my problem.

My setup:

  • ubuntu 20.04
  • nginx 1.18
  • Laravel 7
  • php 7.4

What i did wrong was upgrading from php7.3 -> php7.4, but then forgetting to update the reference in /etc/nginx/sites-available/site-name.com, which was still using php7.3-fpm.sock

fastcgi_pass unix:/var/run/php/php7.4-fpm.sock; is the correct line

sudo apt-get install php-curl did not help, since it installed curl for the version 7.4 and not 7.3, which I was still referencing.

Related