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/services_dhcp.php:454

    Scheduled Pinned Locked Moved CE 2.7.0 Development Snapshots (Retired)
    7 Posts 3 Posters 2.8k 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.
    • N
      nhscan
      last edited by

      After updating to 2.7.0-DEVELOPMENT (amd64) built on Fri Oct 14 06:04:12 UTC 2022 FreeBSD 14.0-CURRENT

      I am getting an php error in the services_dhcp.php line 454.

      I even tryed to replace the file with github one that was updated 16 days ago but that still did not fix it,

      1 Reply Last reply Reply Quote 0
      • jimpJ jimp moved this topic from DHCP and DNS on
      • N
        nhscan
        last edited by

        This post is deleted!
        1 Reply Last reply Reply Quote 1
        • N
          nhscan
          last edited by

          Adding an entry into the virtual IP firewall fixed the issue.
          c36e2516-37aa-4d9f-85d2-5072b1019d92-image.png

          S 1 Reply Last reply Reply Quote 1
          • S
            spyspirit
            last edited by

            @nhscan I also had this error, I am fairly new to pfSense so I don't know how much I can contribute but I had some success restoring my DHCP static list using the "DHCP Server" restore area instead of "ALL".

            I now have a working router without the error but I rebuilt it from scratch, restoring just the DHCP server and firewall rules areas.

            I also haven't re-install pfBlocker-NG this time since I decided to continue using my AdGuard Home server to do what I want instead for now.

            For me, it appears that I had the error either coming from restoring from "All" or after enabling pfblocker-NG.

            1 Reply Last reply Reply Quote 1
            • S
              spyspirit @nhscan
              last edited by

              @nhscan It appears that I posted my message below at the same time you deleted your previous comment and added this one...

              Do you have pfblocker-NG installed by any chance?

              This is interesting, I am now using my pfSense box back as a main router so I won't be screwing around with it but I might spin off a VM to try this if I have some spare time, I really thought it was probably related to pfblocker-NG so I just didn't reinstalled it, this might be the solution I need...

              N 1 Reply Last reply Reply Quote 0
              • N
                nhscan @spyspirit
                last edited by

                @spyspirit Just snort tftp and open VPN exporter for my plugins.
                My son figured out where the error what's happening under virtual IPS under firewall if you just add any local address there it gets rid of the error. Apparently in the service_dhcp.php file it's not checking to see if nothing is selected under virtual IPS it won't let it pass under VIP unless you have something in the box. Never had this issue before so he did figure out a way to just edit the config file Mike file and make it work. It's great having a 17 year old that knows PHP and other programming languages. 😂

                He did make a formal post about it and exactly his findings on GitHub I believe so maybe this would be taken care of obviously if I go back to an older version a month back and restore any of my config fails I don't get that error. So something changed in between.

                1 Reply Last reply Reply Quote 0
                • L
                  louis2
                  last edited by

                  I encountered a couple of php errors since I migrated to 2.7 freebsd 14 or what seems to be called ^devel^ now.

                  They have one thing in common and that is exactly this error.
                  Uncaught TypeError: Cannot access offset of type string on string in xyz

                  Somehow (not at all sure) I have a feeling that it also have a relation with the xml parser (/etc/inc/xml*) . Some observations:

                  /etc/inc/xmlparse.inc:73

                  #0 [internal function]: startElement(Object(XMLParser), 'BR', Array)
                  #1 /etc/inc/xmlparse.inc(188): xml_parse(Object(XMLParser), '<?xml version="...', false)
                  #2 /etc/inc/xmlparse.inc(160): parse_xml_config_raw('/usr/local/pkg/...', 'packagegui', 'false')
                  #3 /usr/local/www/pkg.php(65): parse_xml_config_pkg('/usr/local/pkg/...', 'packagegui')
                  

                  I also noticed an relation with parsing of arrays. When creating an interface or vpn-list.

                  I hope this helps to identify the problem.

                  Louis
                  PS I noticed that there is already a php 8.2 option in FreeBSD ports

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