Thursday, March 28, 2013

Enable cURL in PHP in XAMPP, WAMP, Ubuntu and IIS Server



When running php scripts may be you have faces an error saying cURL not installed or not enabled. So to solve this error I'm giving you simple solution. Please follow the simple steps.

This will work for XAMPP, WAMPP or directly PHP (who are not using any software for server.)

For XAMPP :



  • Locate your XAMPP directory.
  • Open 'php.ini' file located at 'XAMPP\php\php.ini'
  • Now search for 'curl'.
  • Approximately on line no 952 you will get text like ';extension=php_curl.dll'
  • Now remove semicolon (';') from starting of line.
  • It is now 'extension=php_curl.dll'
  • Save file.
  • Restart Apache.


For WAMP : 

   Method 1 (Manually):
  • Locate WAMP directory
  • in WAMP directory open 'bin\php\php x.x.x'(according to your PHP version)
  • open 'php.ini' file. 
  • follow the same procedure as XAMPP from step 3.
   Method 2 :
  • Click WAMPP icon on system tray.
  • Select 'PHP > php extensions > php_curl' (see image)

For Ubuntu :

Run following command in Terminal.


sudo apt-get install php5-curl sudo service apache2 restart

And if you are not using any server above and using PHP with IIS server than follow the same procedure as XAMPP after locating 'php.ini' file in your PHP Installation directory.


Enjoy !


Related Posts Plugin for WordPress, Blogger...