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

PHP Fatal error: Uncaught Error: Cannot use string offset as an array

Scheduled Pinned Locked Moved General pfSense Questions
vlanphperrorcrash
6 Posts 3 Posters 1.9k 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.
  • ?
    A Former User
    last edited by A Former User Jun 10, 2019, 9:21 AM Jun 10, 2019, 9:15 AM

    Hello @ all,

    i am new to pfsense and started to setup a new install on a hardware machine.
    Additionally i have installed the pfblockerng-devel, nmap and snort packages.

    Randomly access to WAN or the webinterface stops working until i reboot the device.
    On the dashboard i am getting the hint to the specific error which hints do to something with the vlan config.
    VLANs are set up through the console.
    PFsense is up to date.

    [10-Jun-2019 07:52:19 Europe/Berlin] PHP Fatal error: Uncaught Error: Cannot use string offset as an array in /etc/inc/config.console.inc:499
    Stack trace:
    #0 /etc/inc/config.console.inc(103): vlan_setup()
    #1 /etc/rc.initial.setports(37): set_networking_interfaces_ports()
    #2 {main}
    thrown in /etc/inc/config.console.inc on line 499
    [10-Jun-2019 07:52:39 Europe/Berlin] PHP Fatal error: Uncaught Error: Cannot use string offset as an array in /etc/inc/config.console.inc:499
    Stack trace:
    #0 /etc/inc/config.console.inc(103): vlan_setup()
    #1 /etc/rc.initial.setports(37): set_networking_interfaces_ports()
    #2 {main}
    thrown in /etc/inc/config.console.inc on line 499

    Does anyone know what to do to stop this behaviour?

    1 Reply Last reply Reply Quote 0
    • G
      Gertjan
      last edited by Gertjan Jun 10, 2019, 11:02 AM Jun 10, 2019, 11:01 AM

      @faib_x said in PHP Fatal error: Uncaught Error: Cannot use string offset as an array:

      to do to stop this behaviour?

      Yep.
      Redo your VLAN config - or post your settings here for more advice.
      A fact is that some user input related to VLAN isn't correct, and the parsing complains now. this should have been flagged as an error as soon as you entered it.
      No body knows what you did ...

      @faib_x said in PHP Fatal error: Uncaught Error: Cannot use string offset as an array:

      nmap and snort packages.

      Not what I call beginner packages ^^

      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
      • ?
        A Former User
        last edited by Jun 10, 2019, 12:49 PM

        Thank you for your answer.
        There is not much i have entered in VLAN config over console. Just the VLAN tag to interface - no errors.
        I completly removed the snort package from pfsense and the issue seems gone.
        Maybe a missconfiguration i have made in the snort package itself or an error while installation.
        Strange.

        1 Reply Last reply Reply Quote 0
        • J
          jimp Rebel Alliance Developer Netgate
          last edited by Jun 10, 2019, 3:19 PM

          What version of pfSense?

          If that is not on pfSense 2.4.4-p3, upgrade to 2.4.4-p3.

          Next, look in a backup of your config.xml and post what you have in your <vlans>...</vlans> section. There might be an empty tag inside there somewhere like <vlan/> or similar that is tripping up some code.

          Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

          Need help fast? Netgate Global Support!

          Do not Chat/PM for help!

          1 Reply Last reply Reply Quote 0
          • ?
            A Former User
            last edited by Jun 10, 2019, 4:38 PM

            My pfSense is on version 2.4.4-p3.
            In my backup config.xml i have an empty <vlans></vlans> between </revision> and <cert>.
            On installation i had set up the vlans in console > 1) Assign Interfaces > Should VLANs be set up now [y | n]? y > Interface Name > VLAN number.
            So the VLANs should be listed in config.xml or something went wrong on installation?

            1 Reply Last reply Reply Quote 0
            • J
              jimp Rebel Alliance Developer Netgate
              last edited by Jun 11, 2019, 1:54 PM

              I have not been able to reproduce the problem here, but I can see how it might happen. I opened https://redmine.pfsense.org/issues/9582 to track it and committed a fix: https://github.com/pfsense/pfsense/commit/45f95753963e497b5ce14493f9cca05336d75c7b

              You can install the System Patches package and then create an entry for 45f95753963e497b5ce14493f9cca05336d75c7b to apply the fix.

              Alternately, you can use viconfig to edit the config and remove that <vlans></vlans> line, or download a backup, edit it out, then restore.

              Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

              Need help fast? Netgate Global Support!

              Do not Chat/PM for help!

              1 Reply Last reply Reply Quote 0
              6 out of 6
              • First post
                6/6
                Last post
              Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                This community forum collects and processes your personal information.
                consent.not_received