Fatal error when trying to alter DHCP Server (2.7.0-DEV)
-
Version: 2.7.0-DEVELOPMENT (amd64)
Error Message: PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/www/services_dhcp.php:454
Stack trace:
#0 {main}
thrown in /usr/local/www/services_dhcp.php on line 454Currently having a weird issue where any time I try to "Save" any changes to the DHCP Server. Even if I try to save without making any changes I get an error. I even tried making a second DHCP Server for a different interface and the same error occurs. I can't save anything without an error. I am getting the following error message:
*PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/www/services_dhcp.php:454
Stack trace:
#0 {main}
thrown in /usr/local/www/services_dhcp.php on line 454I checked line 454 and it contains the following: if (is_array($config['virtualip']['vip'])) {
// Disallow a range that includes the virtualip if (is_array($config['virtualip']['vip'])) { foreach ($config['virtualip']['vip'] as $vip) { if ($vip['interface'] == $if) { if ($vip['subnet'] && is_inrange_v4($vip['subnet'], $_POST['range_from'], $_POST['range_to'])) { $input_errors[] = sprintf(gettext("The subnet range cannot overlap with virtual IP address %s."), $vip['subnet']);
Not sure if it's a bug in the DEV version I am on or if there is something else causing this to time out. Any help is appreciated.
-
2.7.0-DEVEOPMENT contains a totally new version of PHP, and there are many, many incompatibility points in the old pfSense PHP code (which was 7.4) and the new 8.1 version. You are hitting one of the bugs caused by the new PHP update.
Report the bug and the steps to reproduce it on the official pfSense Redmine Site here: https://redmine.pfsense.org/projects/pfsense. The developers regularly use and monitor Redmine for bug tracking and fixes.
-
Issue reported on redmine: https://redmine.pfsense.org/issues/13719
Figured out what was causing the error. It seems to be caused by the pfBlockerNG-devel package. I had a second router I was setting up and checked the DHCP server functionality after every change. Everything worked fine until I installed the pfBlockerNG-devel package. Uninstalling it does not remedy the issue either. A full factory reset is required.
Package specifics
pfBlockerNG-devel
Version: 3.1.0_11Workaround
You can reconfigure the interfaces and DHCP Servers via console to the box. Had no issues making changes via console and all of them took.