PHP extension "curl" must be loaded - PHP Warning: PHP Startup: Unable to load dynamic library 'C:\\php-5.2.14\\ext\\php_curl.dll' - The specified mo

I've recently setup apache/php/mysql (separate installs) on a new laptop which is powered by Windows 7 and would like to setup magento. I encountered an old familiar problem which I forgot long time ago. So I'm blogging the solution now so next time I have a reference :-D.

After successfull installation of apache/php/mysql, download magento and create a virtual directory for it (you can find many tutorials on how to set it up).

On magento installation you might encounter this stubborn error:
"PHP extension "curl" must be loaded"

and when you look into apache's log, certainly you will find this:

"PHP Warning: PHP Startup: Unable to load dynamic library 'C:\\php-5.2.14\\ext\\php_curl.dll' - The specified module could not be found.\r\n in Unknown on line 0"

1.) First thing to check, is if you already uncomment the line pointing to curl.dll
;extension=php_curl.dll -> extension=php_curl.dll
It tells php to load the curl library.

2.) Make sure that you also set the extension directory properly:
extension_dir = "C:\php-5.2.14\ext"

3.) For me instead of putting your dlls in c:\windows\system32, just add c:\phpinstallation to your Environment PATH. I hope you already know how to do this.

4.) If you don't have a problem then perfect if you have the problem that means curl is not loading properly. Take note that the error might not actually means that the system is unable to load php_curl.dll but instead it failed to locate the modules which curl is dependent on.

5.) To see what dlls php_curl depends on, download depends.exe open php_curl.exe and you will see. Often the following dlls are required:
gpsvc.dll, ieshims.dll, zlib.dll, sysntfy.dll, shlwapi.dll, iframe.dll
So make sure you have them in your system


6.) Google and download each. Then put them in your environment path. Since we add c:\phpinstallation to it, we can paste the dlls there

7.) Now restart your apache ->
a.) net stop apachexxx
b.) net start apachexxx

8.) Check phpinfo, if curl properly loads:


If you're unable to download depends.exe and any of the dlls just pm me.
PHP extension "curl" must be loaded - PHP Warning: PHP Startup: Unable to load dynamic library 'C:\\php-5.2.14\\ext\\php_curl.dll' - The specified mo PHP extension "curl" must be loaded - PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\\php-5.2.14\\ext\\php_curl.dll' - The specified mo Reviewed by Edward Legaspi on Tuesday, October 26, 2010 Rating: 5

1 comment:

Anonymous said...

thanks buddy.

Powered by Blogger.