Install cURL PHP Extension on Windows IIS

I tried to run a new PHP script that someone else wrote for me on my Windows Server 2008 and got some errors relating to cURL such as this:

Fatal error: Call to undefined function curl_multi_init()

First I spent a lot of time trying to find information on how to install cURL on a Windows IIS installation, downloaded the cURL package, moved around files, copied to c:\windows\system32, updated php.ini and did all sorts of things described in forums, blogs and manuals but could not get it to work.

Finally I decided to upgrade my PHP from 5.3.1 to the latest 5.3.2 release. I downloaded the PHP Windows MSI installer and there in the Setup Wizard you can simply select what extensions you want to install. Selected cURL and it worked like a charm 🙂 I guess it was just to easy…

(I post about this not only to let everyone know how stupid I am but since I could not find this info anywhere it could be good to document it)

I also tried running the installer again in “Change” mode to add and remove Extensions and the installer seems to be doing a pretty good job at adding and removing files + updating php.ini the way you would expect it to.

At one point I tried installing all Extensions but that got me in to trouble giving me a “oci.dll not found” trying to load an Oracle dll. My tip here is to install only the extensions you need or at least not any related to databases you do not use.

After clicking “Next” when you have selected what Extensions to install, the setup wizard may tell you files are locked and you have to restart the server after installing. A way to avoid this can be to (before clicking “Next”) stop the World Wide Web Publishing Service (from command line: NET STOP W3SVC). Just remember to start it again after!

Extensions available from install package in 5.3.2
bzip2
Curl
Enchant
EXIF
Fileinfo
GD2
Gettext
GMP
IMAP
Internationalization (intl)
LDAP
Multi-Byte String
MySQL
MySQLi
OpenSSL
Oracle (10)
Oracle (11g)
PDO
PostgreSQL
Shared Memory
SNMP
SOAP
Sockets
SQLite
SQLite 3
Tidy
XML-RPC
XSL

1 comment

Leave a comment

Your email address will not be published. Required fields are marked *