When I go to certain parts of CiviCRM, such as Administer > Extensions, or the dashboard, I get a message saying that Curl isn't installed.

I'm running Debian with Apache.

When I run curl --version I am greeted with:

curl 7.38.0 (x86_64-pc-linux-gnu) libcurl/7.38.0 OpenSSL/1.0.1t zlib/1.2.8 libidn/1.29 libssh2/1.4.3 librtmp/2.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp scp sftp smtp smtps telnet tftp 

I've run service apache2 reload to reload apache and it's services, even though curl was already installed before I set the site up as well as cleared the caches drush cc civicrm.

I've looked at the phpinfo in command line and don't see any reference to curl.

This only seems to be an issue on my test site, running CiviCRM 4.7.15 on Drupal 7.

Edit: /etc/php5/cli/conf.d/20-curl.ini shows:

; configuration for php CURL module
; priority=20
  • 1
    /etc/php5/cli/* applies to PHP on the CLI; you want one of the other directories eg /etc/php5/fpm to enable support for your webserver. This should happen automatically but does require a reload of the associated service. When it's reloaded, you'll see curl enabled in the output of phpinfo() (for Drupal 7 sites, visit admin/reports/status/php). – Chris Burgess Nov 27 '17 at 21:23
  • 1
    The means of integrating Apache (a webserver) with PHP varies. Apache has several different ways of executing PHP scripts; some of these require you to reload Apache to pick up PHP config changes, while others require you to restart a separate service like php5-fpm. – Chris Burgess Nov 27 '17 at 21:24
  • 1
    /usr/bin/curl is a CLI wrapper for cURL. php-curl and similar packages provide the same library to PHP. – Chris Burgess Nov 27 '17 at 21:26

Command-line curl and php-curl are usually different packages. Assuming you're using unix you would do something like yum install php-curl or apt-get install php-curl. The exact command depends on what OS and version.

Or it might be installed, e.g. as part of the php-common package for example, but for whatever reason it's not enabled, in which case check /etc/php.d/20-curl.ini (the exact file/location depends again on which OS/version - it might even be directly in php.ini), and enable the curl module in there.

| improve this answer | |
  • Ok so yes it seems installed, just as Chris notes /etc/php5/cli is only for command line. There should be another folder /etc/php5/apache2 or similar, and it should also have a conf.d subfolder that will contain 20-curl.ini – Demerit Nov 27 '17 at 21:50
  • Thank you. Once You helped me understand that there was a different curl for command line and php, etc. I was able to get it installed. – Christia Nov 27 '17 at 23:23
  • With apt-get install php5-curl – Christia Nov 28 '17 at 2:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.