PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/www/services_dhcp.php:454
-
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,
-
-
This post is deleted! -
Adding an entry into the virtual IP firewall fixed the issue.
-
@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.
-
@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...
-
@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.
-
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 xyzSomehow (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