To enable the PHP-cURL extension on Linux Ubuntu/Debian, you must first install it with the command:
1 | sudo apt-get install php-curl |
Or so for the old PHP5 version:
1 | sudo apt-get install php5-curl |
You can activate/deactivate the PHP module like this:
1 2 | sudo phpenmod curl sudo phpdismod curl |
Restart Apache2 to apply the changes:
1 | sudo /etc/init.d/apache2 restart |
Let’s see if curl is activated:
1 | 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