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

    Fatal error: Cannot unset string offsets in /usr/local/pkg/pfblockerng/pfblocker

    Scheduled Pinned Locked Moved pfBlockerNG
    8 Posts 2 Posters 1.6k 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.
    • P
      PFbest
      last edited by

      Anyone encounter this error when save button clicked in pfblocker settings page?

      Fatal error: Cannot unset string offsets in /usr/local/pkg/pfblockerng/pfblockerng.inc on line 4321 Call Stack: 0.0002 246464 1. {main}() /usr/local/www/pkg_edit.php:0 0.9646 3066024 2. eval('global $pfb; $pfb['save'] = TRUE; sync_package_pfblockerng();') /usr/local/www/pkg_edit.php:255 0.9647 3066952 3. sync_package_pfblockerng() /usr/local/www/pkg_edit.php(255) : eval()'d code:3 PHP ERROR: Type: 1, File: /usr/local/pkg/pfblockerng/pfblockerng.inc, Line: 4321, Message: Cannot unset string offsets

      1 Reply Last reply Reply Quote 0
      • BBcan177B
        BBcan177 Moderator
        last edited by

        Its in my pull request to get fixed:  https://github.com/pfsense/FreeBSD-ports/pull/140

        Just ignore the message for now.

        "Experience is something you don't get until just after you need it."

        Website: http://pfBlockerNG.com
        Twitter: @BBcan177  #pfBlockerNG
        Reddit: https://www.reddit.com/r/pfBlockerNG/new/

        1 Reply Last reply Reply Quote 0
        • P
          PFbest
          last edited by

          @BBcan177:

          Its in my pull request to get fixed:  https://github.com/pfsense/FreeBSD-ports/pull/140

          Just ignore the message for now.

          Oh, I thought It's just me and I was trying to figure out how to get around with it.
          BTW, after I clicked save button new interface selected in "Outbound Firewall Rules" is added to config.xml, but under firewall -> rules -> previously selected interface name, there is nothing changed, is this related to this bug or not?

          pfBlocker is amazing!!! Thank you for your time and effort!!!

          Feel excited for getting reply form the author  ;D

          Thank you!

          1 Reply Last reply Reply Quote 0
          • BBcan177B
            BBcan177 Moderator
            last edited by

            Are you using Floating Rules? If so, then edit a rule and it will show the interfaces used… Otherwise, any selected interface should show in its respective Interface Tab.

            "Experience is something you don't get until just after you need it."

            Website: http://pfBlockerNG.com
            Twitter: @BBcan177  #pfBlockerNG
            Reddit: https://www.reddit.com/r/pfBlockerNG/new/

            1 Reply Last reply Reply Quote 0
            • P
              PFbest
              last edited by

              @BBcan177:

              Are you using Floating Rules? If so, then edit a rule and it will show the interfaces used… Otherwise, any selected interface should show in its respective Interface Tab.

              I have some floating rules, but they are not related to pfBlocker (and as you suggested, I tried to enable/disable, create a new random floating rule, but still can't fix it)
              I suspect it can be caused by removing an vlan (opt) interface, while the interface is still selected in "Outbound Firewall Rules" section in pfBlocker?
              Because it seems, this happens after I've done that.
              Do you have any idea to fix it?  :o :o

              (Tried manually add/remove <outbound_interface>in config.xml seems not working, don't know any other ways to fix it  :()

              (Currently, previously configured pfBlocker auto rules stay in LAN interface, but I can't add auto rules to a new interface WLAN. Also I can't remove rules in LAN as well. In short the Enable/Disable function for "Outbound Firewall Rules" stopped working  :-)</outbound_interface>

              1 Reply Last reply Reply Quote 0
              • BBcan177B
                BBcan177 Moderator
                last edited by

                Send a screenshot of the Interface selection in the General tab.

                Run this command from the shell to show what interfaces are selected:

                grep "<inbound_interface\|<outbound_interface" conf="" config.xml<="" pre=""></inbound_interface\|<outbound_interface">
                

                "Experience is something you don't get until just after you need it."

                Website: http://pfBlockerNG.com
                Twitter: @BBcan177  #pfBlockerNG
                Reddit: https://www.reddit.com/r/pfBlockerNG/new/

                1 Reply Last reply Reply Quote 0
                • P
                  PFbest
                  last edited by

                  @BBcan177:

                  Send a screenshot of the Interface selection in the General tab.

                  Run this command from the shell to show what interfaces are selected:

                  grep " <inbound_interface\|<outbound_interface" conf="" config.xml<="" pre=""></inbound_interface\|<outbound_interface"> 
                  

                  Ok, here are the screenshots

                  I just found that, this problem not only exist for now.
                  I reverted the VM back to before, when there was no vlans. Then recreate vlans, go to pfblocker, change nothing but click on save button, same error appears, and yes, if I change something, they won't take effect

                  s1.png
                  s1.png_thumb
                  s2.png
                  s2.png_thumb
                  s3.png
                  s3.png_thumb
                  s4.png
                  s4.png_thumb
                  s5.png
                  s5.png_thumb
                  s6.png
                  s6.png_thumb

                  1 Reply Last reply Reply Quote 0
                  • P
                    PFbest
                    last edited by

                    Solved, it's a bug, just upgrade to latest version.

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