2

On a Windows 7 64bit I installed:

  • Apache 2.4.23 x86 VC11 Thread safe
  • php 5.6.27-Win32-VC11-x86

Apache httpd.conf:

...
LoadModule php5_module "D:/devapps/php/php5apache2_4.dll"
AddHandler application/x-httpd-php .php
PHPIniDir "D:/devapps/php"
...

Everything is working fine and with phpInfo() I see that the loaded PHP.ini is the correct one (PHPIniDir) and the extension intl is enabled:

PHP.ini

...
extension_dir = "D:/devapps/php/ext"
...
extension=php_intl.dll
...

When I test it with command line:

php.exe -c \devapps\php -r "echo '[' . extension_loaded('intl') . ']';"

it reports that the extension is loaded correctly (output: [1]) with no warnings.

But if I look at the apache logs, I see the following error:

PHP Warning: PHP Startup: Unable to load dynamic library 'D:/devapps/php/ext\php_intl.dll' - Cannot find the specified module.\r\n in Unknown on line 0

and through the web server extension_loaded('intl') is false.

Other extension (like soap or curl) works fine.

Can you help me?

user6638
  • 61
  • 5

2 Answers2

3

I made a few tests: after copying the icuuc57.dll, icuin57.dll, icuio57.dll to the Apache bin directory the PHP warning disappeared and the extension intl worked correctly through the web server.

So I solved it in a better manner including the D:\devapps\php on the system %PATH% variable (I have different versions of PHP, so I didn't set it).

It seems that apache is unable to fetch and load those DLL even if they are on the same directory of the php5apache2_4.dll

user6638
  • 61
  • 5
0

Check value of the extension_dir directive in your php.ini.

If it's only ext, try changing it to an absolute path, e.g. D:/devapps/php/ext (if this is the correct path).

Shira
  • 6,392
  • 2
  • 25
  • 27