How do I enable cURL in PHP?
Since XAMPP went through some modifications, the file is now at xampp/php/php.ini
.
For Ubuntu (and probably all Debian-Based) Linux Distributions:
sudo apt-get install php5-curl
sudo /etc/init.d/apache2 restart
You might have seen PHP Fatal error: Call to undefined function curl_init()
before.
If none of the above solves your problem and have installed with php-x86 (Windows 32 bit), then problem may be of openssl - for more info : How to fix libeay32.dll was not found error
If you're are using MAMP, cURL is enabled by default.
to install php5-curl
under opensuse:
sudo yast2
->software ->software management ->search for curl ->check php5-curl case and accept.
after installation you need to restart apache server
service apache2 restart
Steps for Windows 7:
extension=php_curl.dll
in the php.ini is uncommentedFinally and maybe the one most people don't know:
4. Ensure that there are these two files in the Windows System32 folder:
libeay32.dll
ssleay32.dll
If not there, you may copy these two files from the php
folder.