Skip to content →

Unable to load or find PHP extension php_intl.dll

PHP Startup: Unable to load dynamic library ‘C:/wamp/path/to/php/ext/php_intl.dll’ – The specified module could not be found.

This is a very common issue, especially under PHP 5.5, and can easily be fixed.

To find out why PHP cannot load extension php_intl.dll, open the command prompt , change to WAMP’s PHP directory, and test the php_intl.dll dependencies (i.e., the other DLL files it needs):

C:
cd \WampDeveloper\Components\Php
deplister.exe ext\php_intl.dll

This is a list of all the DLL files php_intl.dll must load itself, before PHP can load it:

Core PHP DLL

php5ts.dll,OK

International Components for Unicode (ICU) libraries – Unicode and Globalisation support

icuuc51.dll,OK
icuin51.dll,OK
icuio51.dll,OK

Microsoft VC++ 2012 Runtime libraries – common functions required by C and C++ programs

MSVCR110.dll,OK
MSVCP110.dll,OK

Core Windows DLL

KERNEL32.dll,OK

[/syntax]
On a system with this issue, either the “ICU” or the “VC++ Runtime” DLL files will not be found (i.e., shown as “NOTFOUND” instead of “OK” in the above output).

And when php_intl.dll is not able to find and load these dependencies, PHP outputs:

[syntax]”The specified module could not be found.”[/syntax]
Here is how to fix the issue and load php_intl.dll:

  1. Make sure the PHP directory path is included in the system’s PATH environmental variable so this set of provided/included ICU DLLs, that php_intl.dll depends on, are found:

[syntax]icuuc51.dll, icuin51.dll, icuio51.dll[/syntax]
* WampDeveloper Pro already includes PHP’s directory in PATH, but some other WAMP distributions do not.

  1. Install the Microsoft VC++ 2012 Runtime Redistributable that will provide these VC11 runtime DLLs that php_intl.dll depends on (PHP 5.5 is built with VS.NET 2012):

[syntax]MSVCR110.dll, MSVCP110.dll[/syntax]
Visual C++ Redistributable for Visual Studio 2012 Update 4

Make sure to install the 32 bit (x86) version if you are using a 32 bit PHP build: vcredist_x86.exe

  • Unlike PHP 5.5, PHP 5.3 is built with VS.NET 2008 (VC9), and depends on “Visual C++ Redistributable for Visual Studio 2008″ which provides runtime DLLs: MSVCR90.dll, MSVCP90.dll

Also check if your system contains the PHP extension file (e.g., php_intl.dll, php_curl.dll, etc) outside the WAMP folder.Sometimes PHP extensions wind up in the C:\Windows or C:\Windows\System32 folder from previous installations of PHP. And this becomes a problem – as the PHP process will usually loading them first – and abort on a build mismatch. If  everything else fails, uninstalling WAMP, deleting the remaining folder/files, and re-installing often fixes the issue. But before you do that, try deleting the PHP extension file, and replacing it with the original file from the provided PHP version’s zip. It might just have gotten corrupted.

Published in Code PHP PHP

Comments

Leave a Reply