How to Install PHP CURL on IIS

Sun, Jun 21, 2009

Tech Tips

Are you getting this error:
Fatal error: Call to undefined function curl_init() in C:\myfile.php on line 100

A quick overview on how to get the php_curl.dll working on IIS. This works with PHP 5.x on Windows. Most likely you did not install the CURL extension when you first installed PHP on your machine. Below is the easiest method to install any missing extensions (like CURL):

  1. Go to Add/Remove Programs in Control Panel, Find the PHP 5 installation in the list and click Change.
  2. When the installer comes up, click Change
    Changing Your PHP Installation to Install an Extension

    Changing Your PHP Installation to Install an Extension

  3. Find Curl in the list of extensions and click OK to save and finish the installation
    Installing CURL using the PHP Installer

    Installing CURL using the PHP Installer

  4. Restart IIS (from command Prompt, type “iisreset”). Now curl should be working for you.

This is much easier that having to find the dll yourself and modifying the php.ini file.

Bookmark and Share
, ,

3 Responses to “How to Install PHP CURL on IIS”

  1. Tyler Says:

    A thousand times thank you! You saved me from a headache and hours of after hours work.

  2. Junlee Says:

    What if i’m not using installer to install php, is there any other way?

  3. indio Says:

    I don’t use installer. I saw the file ext\php_curl.dll (or something like this). Uncommented the line extension=php_curl.dll.
    php -m now shows curl