Enable php intl Extension on XAMPP for Windows

How to fix php Error: "Call to undefined function idn_to_ascii() or idn_to_utf8()"

The php function "idn_to_ascii()" converts an international domain name (with utf-8 characters in the domain name) to IDNA ASCII form (punycode). "idn_to_utf8()" does the opposite ... it converts the domain name back from punycode to utf-8 (unicode).

 

Call to undefined function idn_to_ascii() or idn_to_utf8()

This error message is shown if the php extension "intl" is not enabled.

 

Enable php Extension "intl" on XAMPP for Windows

 

1. Start the XAMPP Control Panel and stop the module "Apache".

2. Locate your XAMPP folder, e.g. C:\xampp

3. Open the folder "php" and locate the file "php.ini", e.g. C:\xampp\php\php.ini

4. Open the file "php.ini" in a (plain) text editor and search for "php_intl.dll" in the "Windows Extensions" section:


Enable php intl extension

 

5. Uncomment "extension=php_intl.dll" to enable the extension.

Change:

;extension=php_intl.dll

to

extension=php_intl.dll

(simply remove the semicolon at start)

 

6. Save the php.ini file.

7. Open the XAMPP Control Panel again and start the module "Apache".

 

Retry your php code ... the error should be gone now.

Disclaimer: The information on this page is provided "as is" without warranty of any kind. Further, Arclab Software does not warrant, guarantee, or make any representations regarding the use, or the results of use, in terms of correctness, accuracy, reliability, currentness, or otherwise. See: License Agreement