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



  • 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


  • Moderator

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

    Just ignore the message for now.



  • @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!


  • Moderator

    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.



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


  • Moderator

    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">
    


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














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