Thursday, 26 April 2012

Install setup PHP Curl in linux and windows

To install or setup cURL on your Linux machine like Ubuntu,Mint, run the following line of shell command in your terminal:

sudo apt-get install curl libcurl3 libcurl3-dev php5-curl

Now you have PHP cURL installed, the next thing you need to do is to restart apache2, run the following command in your terminal:

sudo /etc/init.d/apache2 restart

To install or setup cURL on windows

As with any PHP extension in Windows, you will need the PHP distribution that includes external extensions. Once PHP is installed, you will need to copy the files php4ts.dll, ssleay32.dll, php_curl.dll, msvcrt.dll from the ‘DLLs’ folder to your Windows PATH, i.e.:

c:\windows\system for Windows 9x/Me
c:\winnt\system32 for
Windows NT/2000
c:\windows\system32 for Windows XP

cURL can then be enabled by uncommenting the line ‘extension=php_curl.dll’ in the php.ini file.