PHP Fatal error after adding port forward
-
I just tried to forward a port from my WAN port to a static IP on my LAN. I selected NAT reflection: Enable and Filter rule: Add associated filter rule.
After doing this I returned to the dashboard and found "Netgate pfSense Plus has detected a crash report or programming bug." which led me to:
=====
Crash report begins. Anonymous machine information:arm
14.0-CURRENT
FreeBSD 14.0-CURRENT armv7 1400094 #1 plus-RELENG_23_09_1-n256200-3de1e293f3a: Wed Dec 6 20:55:45 UTC 2023 root@freebsd:/var/jenkins/workspace/pfSense-Plus-snapshots-23_09_1-main/obj/armv7/XXxrkrip/var/jenkins/workspace/pfSense-Plus-snapshots-23_09_1Crash report details:
PHP Errors:
[28-Jul-2025 15:11:12 Europe/Zurich] PHP Fatal error: Uncaught TypeError: format_number(): Argument #1 ($num) must be of type int, float given, called in /usr/local/www/firewall_rules.php on line 125 and defined in /etc/inc/util.inc:2338
Stack trace:
#0 /usr/local/www/firewall_rules.php(125): format_number(8715080869.0)
#1 /usr/local/www/firewall_rules.php(581): print_states(11000, 11999)
#2 {main}
thrown in /etc/inc/util.inc on line 2338=
Now if I click on Firewall / Rules all of my interfaces appear to have no rules. Clicking between interfaces on the Rules page will eventually lock up the web interface.
How can I recover from this? Are my old rules active? I'm hoping this is just the web interface that's broken and not the underlying firewall config!
-
@axxxxe said in PHP Fatal error after adding port forward:
I just tried to forward a port from my WAN port to a static IP on my LAN.
Port forwarding ..... so devices from the Internet can reach an internal, LAN based, device, right ?
See here : Network Address Translation - so chose the very first proposition called Port Forwarding.
Imho, : you don't need to use, and don't need to deal with NAT Reflection.
delete your faulty NAT rule, reload the firewall and restart using [Network Address Translation](Network Address Translation) - so you've chosen the first proposition called Port Forwarding.
Btw : Beta 23.09 ?
Is it because you use an arm based device you've stopped updating / upgrading ? -
Yup, you should upgrade. 23.09.1 is later than the last release for the SG-1000 so it must be a 3100 which supports the current Plus version.
You might have pulled in a newer pkg if the branch is selected and that could cause the PHP error.
-
Ok, thanks for the suggestions. It's a Netgate 3100 and running in production. I will try to update this weekend. (The old firewall rules do appear to be in operation - whew!)