23.01 upgrade, DHCP page broken
-
Immediately after logging in after the upgrade to 23.01 was complete, I had a notification with the following...
PHP ERROR: Type: 1, File: /etc/inc/services.inc, Line: 542, Message: Uncaught TypeError: Cannot access offset of type string on string in /etc/inc/services.inc:542 Stack trace: #0 /etc/inc/services.inc(483): services_dhcpdv4_configure() #1 /etc/rc.bootup(371): services_dhcpd_configure() #2 {main} thrown @ 2023-02-16 21:10:13
If I try to visit the Services > DHCP Server page, I receive this error on a white page...
Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/www/services_dhcp.php:140 Stack trace: #0 {main} thrown in /usr/local/www/services_dhcp.php on line 140 PHP ERROR: Type: 1, File: /usr/local/www/services_dhcp.php, Line: 140, Message: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/www/services_dhcp.php:140 Stack trace: #0 {main} thrown
The Status > DHCP Leases page gives me this on a white page...
Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /etc/inc/util.inc:3517 Stack trace: #0 /etc/inc/system.inc(761): dhcpd_date_adjust_gmt('2022/05/22 16:5...') #1 /usr/local/www/status_dhcp_leases.php(91): system_get_dhcpleases() #2 {main} thrown in /etc/inc/util.inc on line 3517 PHP ERROR: Type: 1, File: /etc/inc/util.inc, Line: 3517, Message: Uncaught TypeError: Cannot access offset of type string on string in /etc/inc/util.inc:3517 Stack trace: #0 /etc/inc/system.inc(761): dhcpd_date_adjust_gmt('2022/05/22 16:5...') #1 /usr/local/www/status_dhcp_leases.php(91): system_get_dhcpleases() #2 {main} thrown
See the attached PHP_errors log file.
I guess I'm going to roll back.
-
On a related note, apparently the PHP_errors.log file does not match the text displayed on the "We noticed some PHP errors" page. Had I known that, I would've copied/pasted that text here as well.
-
@kimbleworshack Discovered the same today after changing a setting in DHCP server. See my thread: 23.01-RELEASE on 6100 MAX fatal crash
-
@kimbleworshack Can you try to "reassign" an interface IP via console? So chose 2) in console menu, pick any interface that has a DHCP Server running and reenter the same interface IP again. That "workaround" fixed the issue for me.
-
@mrsunfire After making the change from the console to get the WebUI working again, are you then able to make a change from the WebUI without it breaking again?
In your post, you mentioned simply hitting the Save button was enough to trigger the error, and if that indeed continues to be the case, then I’d rather wait for Netgate to fix the config reader before I attempt another upgrade.
-
@kimbleworshack said in 23.01 upgrade, DHCP page broken:
@mrsunfire After making the change from the console to get the WebUI working again, are you then able to make a change from the WebUI without it breaking again?
Yes!
-
@mrsunfire Sorry for the long delay, but it's been a while since I bothered to attempt the upgrade again after how frustrating the last attempt was.
I upgraded to 23.01 again and followed your advice about setting the IP/DHCP server information from the console, but this did not resolve the issue for me. I'm guessing because I have multiple DHCP ranges configured across a few VLAN's.
I decided to go spelunking and investigate where the issue was occurring. The code in question at line 140 in /usr/local/www/services_dhcp.php was attempting to fetch the key 'dhcpleaseinlocaltime' from the config.
It was present in all of my interfaces except for one that wasn't running a DHCP Server, and was simply an empty section (under '<dhcpd>' was '<opt1></opt1>'). I deleted that section from my /conf/config.xml and rebooted.
After the reboot, the DHCP Server page now works.
Sigh. What an adventure.
-
@KimbleWorshack Great that you could resolve this. 23.05 seems to fix all other bugs for me aswell.