Uncaught Error: Call to undefined function idn_to_utf8()
-
Good evening, everyone.
I ran into this error a moment ago and thought I would post the solution I found here in hops it will help someone else.
Possibly due to a sudden unclean shutdown my firewall experienced the other day, possibly otherwise, I began getting the following error message and my firewall rules page failed to load correctly.
Crash report begins. Anonymous machine information: amd64 12.2-STABLE FreeBSD 12.2-STABLE fd0f54f44b5c(RELENG_2_5_0) pfSense Crash report details: PHP Errors: [03-Feb-2022 22:06:41 America/New_York] PHP Fatal error: Uncaught Error: Call to undefined function idn_to_utf8() in /etc/inc/util.inc:3651 Stack trace: #0 /usr/local/www/guiconfig.inc(981): alias_idn_to_utf8('146.88.240.4') #1 /usr/local/www/firewall_rules.php(787): alias_info_popup(4) #2 {main} thrown in /etc/inc/util.inc on line 3651 [03-Feb-2022 22:06:47 America/New_York] PHP Fatal error: Uncaught Error: Call to undefined function idn_to_utf8() in /etc/inc/util.inc:3651 Stack trace: #0 /usr/local/www/guiconfig.inc(981): alias_idn_to_utf8('10.0.0.0/24') #1 /usr/local/www/firewall_rules.php(805): alias_info_popup(5) #2 {main} thrown in /etc/inc/util.inc on line 3651 [03-Feb-2022 22:06:49 America/New_York] PHP Fatal error: Uncaught Error: Call to undefined function idn_to_utf8() in /etc/inc/util.inc:3651 Stack trace: #0 /usr/local/www/guiconfig.inc(981): alias_idn_to_utf8('146.88.240.4') #1 /usr/local/www/firewall_rules.php(787): alias_info_popup(4) #2 {main} thrown in /etc/inc/util.inc on line 3651 [03-Feb-2022 22:09:39 America/New_York] PHP Fatal error: Uncaught Error: Call to undefined function idn_to_utf8() in /etc/inc/util.inc:3651 Stack trace: #0 /usr/local/www/guiconfig.inc(981): alias_idn_to_utf8('146.88.240.4') #1 /usr/local/www/firewall_rules.php(787): alias_info_popup(4) #2 {main} thrown in /etc/inc/util.inc on line 3651 [03-Feb-2022 22:09:43 America/New_York] PHP Fatal error: Uncaught Error: Call to undefined function idn_to_utf8() in /etc/inc/util.inc:3651 Stack trace: #0 /usr/local/www/guiconfig.inc(981): alias_idn_to_utf8('edge.steam-dns....') #1 /usr/local/www/firewall_rules.php(805): alias_info_popup(3) #2 {main} thrown in /etc/inc/util.inc on line 3651 [03-Feb-2022 22:21:52 America/New_York] PHP Fatal error: Uncaught Error: Call to undefined function idn_to_utf8() in /etc/inc/util.inc:3651 Stack trace: #0 /usr/local/www/guiconfig.inc(981): alias_idn_to_utf8('146.88.240.4') #1 /usr/local/www/firewall_rules.php(787): alias_info_popup(4) #2 {main} thrown in /etc/inc/util.inc on line 3651 No FreeBSD crash data found.
It looks like something broke with PHP, but after following a few instructions I found on this forum for similar issues I was still getting the crash.
The solution I found
After looking for non pfSense specific answers, I found that the function "idn_to_utf8()" belongs to the PHP "intl" module.Running a pkg search using
pkg search php7 | grep intl
the current version for this module appears to be "php74-intl-7.4.20"
I then installed this package and restarted php-fpm by exiting to the pfSense menu and running option #16.
After this I was able to successfully load the firewall rules page again and the error is no longer appearing.
I hope someone finds this useful, and if someone has a more appropriate way to correct this issue, please chime in and correct me below.
-
@superfish1000 said in Uncaught Error: Call to undefined function idn_to_utf8():
RELENG_2_5_0
What is your pfSense version ? 2.5.0 ?
In that case : ok - why not.
But do not install upgrade any packages as that could break (like PHP errors etc) your system.@superfish1000 said in Uncaught Error: Call to undefined function idn_to_utf8():
Possibly due to a sudden unclean shutdown
If you suspect a unclean (power cut) shut down, use the console access, have it reboot using 5, and check if you see any 'file system not clean' messages. If that's the case, go for the clean file system Netgate video, and do what's being shown ( clean the system ).
Bad file system can make files disappear. Like PHP library files. -
@gertjan said in Uncaught Error: Call to undefined function idn_to_utf8():
RELENG_2_5_0
2.5.2 was built on that branch.