Making the PHP Curl Extension Work on Windows

Earlier tonight I was setting up some development tools on my new laptop and ran across a problem that I had never seen before.  When I began testing an application that uses the Facebook API (which depends on the CURL library), PHP insisted that the CURL extension was not loaded.  I checked and double-checked that my php.ini file was correct (it was) and that the rest of my extensions were loading (they were).

Finally after looking at the installation documentation for the CURL module I realized my mistake: I had forgotten to put PHP on the system path. According to

In order to enable this module on a Windows environment, libeay32.dll and ssleay32.dll must be present in your PATH. You don’t need libcurl.dll from the cURL site.

In other words, you either need to adjust your PATH environment variable to contain C:\PHP or you need to copy these two files from that directory to a directory that is on the path, such as C:\windows\system32. Either solution should resolve the problem.