How to enable PHP-cURL

To enable the PHP-cURL extension on Linux Ubuntu/Debian, you must first install it with the command:

sudo apt-get install php-curl

Or so for the old PHP5 version:

sudo apt-get install php5-curl

You can activate/deactivate the PHP module like this:

sudo phpenmod curl
sudo phpdismod curl

Restart Apache2 to apply the changes:

sudo /etc/init.d/apache2 restart

Let’s see if curl is activated:

php -i | grep -i curl

On Windows systems, cURL is usually bundled with PHP, and to enable it, you need to uncomment the extension=php_curl.dll line in the php.ini file. Then restart the Apache2 service.

See also my article:
How to compile cURL on Ubuntu

Leave a comment

Leave a Reply