I've been trying to get the intl extension working on my test workstation (PHP 5.5.1, Apache 2.2.4, Windows 7 32-bit). It seems that no matter what I try I can't get it up and running.
I've checked the Apache error log and found this line every time I've restarted Apache:
PHP Warning: PHP Startup: Unable to load dynamic library 'c:\wamp\php5.5\ext\php_intl.dll' - The specified module could not be found.\r\n in Unknown on line 0
I repeat myself, but c:\wamp\php5.5\ext\php_intl.dll DOES EXIST!
I'm tempted to try pointing at Windows Explorer and shouting at my computer, "LOOK! THE STINKIN' FILE IS RIGHT THERE!" Any idea why I can see the file and PHP cannot even though we're apparently looking in the same directory? Or is something else going on that I've missed?
On Windows, you have two ways to load a PHP extension: either compile it into PHP, or load the DLL. Loading a pre-compiled extension is the easiest and preferred way. To load an extension, you need to have it available as a ". dll" file on your system.
The Internationalization extension (Intl) is a wrapper for the ICU library, a set of C/C++ and Java libraries that provide Unicode and Globalization support for software applications. It enables PHP programmers to perform UCA-conformant collation and date/time/number/currency formatting in their scripts.
Make sure that Apache can find and load icu*.dll files from PHP base dir.
Fast, simple solution is to copy these dll's to Apache bin directory.
Although SeventyFourLaboratories's solution is simple and it works, there is a solution that doesn't require you to modify your Apache or PHP distribution (and sometimes, you are not allowed to change them in production servers).
You said you've verified C:\wamp\php5.5
is in your PATH
. Windows has two kinds of environment variables: user and system variables.
I've tried to set C:\wamp\php5.5
in my user variable PATH
, and it doesn't work. But, setting it in the system variable PATH
makes it work. So, you should verify that you use the PATH
system variable to configure Apache instead of a user variable with the same name.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With