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.

4 comments:

  1. i have not find the php4ts.dll, ssleay32.dll, php_curl.dll, msvcrt.dll in system32 on windows 7

    ReplyDelete
  2. you need to check in C:\wamp\bin\php\php5.3.5\ext

    ReplyDelete
  3. where should i put those files in windows 8

    ReplyDelete
  4. above code is not working for me, getting error "CURLOPT_FOLLOWLOCATION cannot be activated when safe_mode is enabled or an open_basedir is set in"

    ReplyDelete