Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    PHP Fatal error

    Scheduled Pinned Locked Moved Firewalling
    7 Posts 3 Posters 988 Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J Offline
      jsseb
      last edited by

      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.

      patient0P GertjanG 2 Replies Last reply Reply Quote 0
      • patient0P Online
        patient0 @jsseb
        last edited by

        @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.

        J 1 Reply Last reply Reply Quote 0
        • GertjanG Online
          Gertjan @jsseb
          last edited by

          @jsseb

          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).

          No "help me" PM's please. Use the forum, the community will thank you.
          Edit : and where are the logs ??

          J 1 Reply Last reply Reply Quote 0
          • J Offline
            jsseb @patient0
            last edited by jsseb

            @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.

            1 Reply Last reply Reply Quote 0
            • J Offline
              jsseb @Gertjan
              last edited by

              @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.

              GertjanG 1 Reply Last reply Reply Quote 0
              • J Offline
                jsseb
                last edited by

                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.

                1 Reply Last reply Reply Quote 0
                • GertjanG Online
                  Gertjan @jsseb
                  last edited by

                  @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 :

                  92aa08e1-c0a0-46cf-b8e6-884b5af6d3c4-image.png

                  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.

                  No "help me" PM's please. Use the forum, the community will thank you.
                  Edit : and where are the logs ??

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post
                  Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.