Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Call to undefined function curl_version

Tags:

php

wordpress

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.
like image 987
Max08 Avatar asked Jul 09 '17 21:07

Max08


1 Answers

On current versions of Debian and Ubuntu, you can likely solve this by installing the Curl extension for PHP, and restarting the webserver. Assuming the webserver is Apache 2:

sudo apt-get install php-curl

sudo service apache2 restart

It's possible you'll need to install more:

sudo apt-get install curl libcurl3 libcurl3-dev;

like image 107
yoeunes Avatar answered Sep 30 '22 02:09

yoeunes