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

    PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/www/firewall_rules.php:805

    Scheduled Pinned Locked Moved General pfSense Questions
    10 Posts 5 Posters 1.7k Views
    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
      jared
      last edited by jared

      Just upgraded my pfsense box from 22.05 to 23.01. I've been getting fatal php errors when trying to view the floating firewall rules page:

      Crash report details:
      
      PHP Errors:
      [17-Feb-2023 17:43:12 America/Los_Angeles] PHP Fatal error:  Uncaught TypeError: Cannot access offset of type string on string in /usr/local/www/firewall_rules.php:805
      Stack trace:
      #0 {main}
      thrown in /usr/local/www/firewall_rules.php on line 805
      

      That line in firewall_rules.php is:

      if  ($config['openvpn']['openvpn-server'] || $config['openvpn']['openvpn-client'])
      

      I used to have openvpn setup, but I removed the config a while back and setup wireguard instead. I figured I'd see what would happen if I went through the wizard again and setup another openvpn server. With a new openvpn server and interface created, the firewall floating rules page errors disappear. Deleting the openvpn server causes the php errors to occur again.

      It displays 8 (out of 13) rules then the error and nothing else. This is what's actually displayed on the floating rules page instead of the next floating rule in the list. The rule is a pass rule... nothing to do with openvpn:

      0b14ae6f-7c60-4880-bbbb-e4007310d9a4-image.png

      So now after writing this whole post and creating/deleting an openvpn server several times, I decided to delete the next 3 floating rules (two were pass rules. the 3rd was a block rule. all used ip aliases). This time when I deleted the openvpn server the errors did not return when viewing the floating rules page. I've since moved the referenced ips I had in the floating firewall rules to rules within pfBlocker, which is how I should have been handling these to begin with.

      So problem solved I guess? Not sure why it was getting hung up on those particular rules to begin with. Posting this in case anyone else runs into this same problem. You're welcome. ;)

      1 Reply Last reply Reply Quote 0
      • stephenw10S
        stephenw10 Netgate Administrator
        last edited by

        Created a bug to track it: https://redmine.pfsense.org/issues/13982

        That shouldn't happen.

        M JonathanLeeJ 2 Replies Last reply Reply Quote 1
        • M
          mrsunfire @stephenw10
          last edited by

          @stephenw10 Looks the same as my issue and the issue from other users. We all get these PHP Fatal error but only with different pages in the WebGUI. Mine was in the DHCP Server tab, another @furom has it with the interface tab. This guy here has it with the firewall tab.

          Netgate 6100 MAX

          stephenw10S 1 Reply Last reply Reply Quote 0
          • NollipfSenseN NollipfSense referenced this topic on
          • stephenw10S
            stephenw10 Netgate Administrator @mrsunfire
            last edited by

            @mrsunfire Those are all different errors that just have similar failure modes.

            1 Reply Last reply Reply Quote 0
            • JonathanLeeJ
              JonathanLee @stephenw10
              last edited by

              @stephenw10 I am having a similar issue with Squid when I save changes on the general tab

              137e899c-1a1c-4e9d-9c05-316f7e445d65-image.png

              Make sure to upvote

              1 Reply Last reply Reply Quote 0
              • R
                rusli
                last edited by rusli

                seen that i have same issue 90ec1c13-aa7e-4b8d-b766-87db5db5dfcc-image.png ...fatal error on firewall rules, and the bad thing all rules not running as well after upgrade 23.01

                telegram keep sending notification PHP Error
                5b41d75b-f84b-4877-8ed4-1c25601f6daf-image.png

                1 Reply Last reply Reply Quote 0
                • stephenw10S
                  stephenw10 Netgate Administrator
                  last edited by

                  That is the same bug: https://redmine.pfsense.org/issues/13953

                  So you can workaround it by removing the OpenVPN group from the interfaces that floating rule is working on. Or by adding an OpenVPN instance even if it does nothing.

                  Steve

                  JonathanLeeJ 1 Reply Last reply Reply Quote 0
                  • JonathanLeeJ
                    JonathanLee @stephenw10
                    last edited by

                    @stephenw10 hello Stephen, what about the issue with 🦑 is there any work around?

                    Make sure to upvote

                    1 Reply Last reply Reply Quote 0
                    • stephenw10S
                      stephenw10 Netgate Administrator
                      last edited by

                      I don't know about that but it's a different bug it should be in a new thread. Unless one exists.

                      JonathanLeeJ 1 Reply Last reply Reply Quote 0
                      • JonathanLeeJ
                        JonathanLee @stephenw10
                        last edited by JonathanLee

                        @stephenw10

                        Sorry that is on a couple different threads, I have one here
                        https://forum.netgate.com/topic/178036/23-01-squid-issue/3?_=1676773067228
                        It is PHP errors when you save configuration changes

                        Make sure to upvote

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