PHP Fatal error
-
Running into a PHP fatal error while attempting to access the
Firewall > Rules
menu. I can not review existing rules or add new ones without access to the menu through the GUI.PHP Error message
arm 15.0-CURRENT FreeBSD 15.0-CURRENT #0 plus-RELENG_24_11-n256407-1bbb3194162: Fri Nov 22 05:04:59 UTC 2024 root@freebsd:/var/jenkins/workspace/pfSense-Plus-snapshots-24_11-main/obj/armv7/k0yp0fpJ/var/jenkins/workspace/pfSense-Plus-snapshots-24_11-main/sources/FreeBS Crash report details: PHP Errors: [29-Sep-2025 17:21:15 America/New_York] 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:2585 Stack trace: #0 /usr/local/www/firewall_rules.php(125): format_number() #1 /usr/local/www/firewall_rules.php(841): print_states() #2 {main} thrown in /etc/inc/util.inc on line 2585
I appreciate any help in resolving this issue.
-
@jsseb it looks like a bug and none of the patches for 24.11 seems to address that.
Is an upgrade to 25.7 an option, to see if it's solved? Are you using the ZFS file system, then roll-back would be easy in case of (other) issues.
If not, opening a bug report on https://redmine.pfsense.org would be the other option.
-
Export your config, and open the obtained xml file with a text editor.
Serach<filter>
The filters section has <rule> section, and each rule section is a firewall rule.
Now look for what seems strange ... like a number that is stored as a float (a number with a decimal point).
-
@patient0, thanks for the response and suggestions here. I haven’t considered upgrading my current
SG-3100 ARM
device, mainly due to DHCP issues, but I know I can switch back to ISC instead of Kea, as I am currently doing, to avoid these issues. Nonetheless, I could restore to a 25.7 VM and see if I encounter the problem.
EDIT: Forgot this would have to be a CE VM.
-
@Gertjan, it appears the only float numbers I have in the rules are under Outbound NAT rules; specifically, the
associated-rule-id
, e.g., (<associated-rule-id>nat_663be24b04f294.10942082</associated-rule-id>
). I have about four of these, the only ones, but they have been in place since day one. -
UPDATE: ISSUE CLOSED
Since I could afford a bit of downtime, I ended up upgrading to 25.7.1, and all is working as expected now. Although I’m still working, this could’ve been caused by a hung process that a reboot might have resolved.I'll submit a bug report to the team and see if there's anything they could find, but suspect it a tricky one since the error message didn't point to any specific package that would've caused the issue.
-
@jsseb said in PHP Fatal error:
.. but they have been in place since day one.
For what it's worth : I'm seeing the same thing :
which looks like a floating number, but isn't ...
I've 16 of them.
Using 25.07.1 for weeks now.
So, whatever the issue was, this wasn't it.