1
votes

I've installed the intl extension via PECL on Debian Squeeze. But when I put extension=intl.so in my php.ini file and restart Apache, it loads CP to about 99% and nothing works. The only way to make the server work again is to remove the extension=intl.so line from php.ini file. Why?

Apache error log is:

[Wed Nov 28 23:09:59 2012] [notice] suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec) PHP Warning: Function registration failed - duplicate name - idn_to_ascii in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - idn_to_utf8 in Unknown on line 0 PHP Warning: idn: Unable to register functions, unable to load in Unknown on line 0

1
have you checked your Apache log for errors? - cryptic ツ
make sure you are not accidentally loading the PECL twice, possibly may be listed under a different name, also check to make sure PHP was not compiled with it. One easy way to check is disable loading intl.so and then test out one of the intl functions in a PHP script, if it successfully runs then you already have it loaded. - cryptic ツ

1 Answers

4
votes

function names need to be unique for obvious reasons.

The (recommended) extension intl provides the functions idn_to_ascii and idn_to_utf8 (along with other helpful functions), as well as the pecl extension idn (source)

idn is in (early) beta since 2009 and no longer developed.

How do I fix that??

What you have to do is to uninstall your idn extension

apt-get remove php-pecl-idn

or ( depends how this was installed )

pecl uninstall idn

or simply comment the the extension in your config

; extension=idn.so

then restartart your apache