简体   繁体   中英

How can I enable PHP Extension intl in an Apache server?

I have removed the starting semicolon (; ) from php.ini the following code.

;extension=php_intl.dll

Screenshot: php.ini

And everything seems fine when I runs

php -m

Screenshot: cmd.exe. Looks like intl has been loaded

But in the website powered by Apache, the extension intl simply disappeared when I opens a website with source code below:

<?php

phpinfo();

?>

ScreenShot: intl disappeared

Meanwhile, extension mbstring can be seen in both direction. I'm wondering how to load intl correctly. Please help me.

Note: Operating system: Windows 10 Apache: httpd-2.4.54-o111s-x64-vs16 PHP: php-8.2.0-Win32-vs16-x64

I have tried:

  1. copy php_intl.dll to Apache24/bin or Windows/SysWOW64
  2. reinstall Visual C++ 2019 Redistributed
  3. check httpd.conf and php.ini again

httpd.conf

LoadModule php_module modules/php-8.2.0-Win32-vs16-x64/php8apache2_4.dll

AddType application/x-httpd-php.php.html.htm

PHPIniDir "C:/Program Files/Apache Software Foundation/Apache24/modules/php-8.2.0-Win32-vs16-x64/"

php.ini

extension=intl

I copied icu****.dll from PHP folder to Apache24/bin folder and everything looks fine now.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM