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

    PHP Fatal error after adding port forward

    Scheduled Pinned Locked Moved General pfSense Questions
    4 Posts 3 Posters 89 Views 4 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.
    • A Offline
      axxxxe
      last edited by

      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_1

      Crash 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!

      GertjanG 1 Reply Last reply Reply Quote 0
      • GertjanG Offline
        Gertjan @axxxxe
        last edited by Gertjan

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

        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
        • stephenw10S Offline
          stephenw10 Netgate Administrator
          last edited by

          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.

          1 Reply Last reply Reply Quote 0
          • A Offline
            axxxxe
            last edited by

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

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