Still php error on Netgate 6100. System patch can't be applied.
-
Changing a setting on DHCP Server tab results in php error/crash. The fix for this Redmine #13983 is available via system patches pkg. Unfortunately this fix can't be applied.
Patch debug:
/usr/bin/patch --directory='/' -f --strip '2' -i '/usr/local/pkg/patches/fae6b2c014749b3f56e03b3ea7e51ecee2cf53be.patch' --check --reverse --ignore-whitespace Hmm... Looks like a unified diff to me... The text leading up to this was: -------------------------- |diff --git a/src/etc/inc/pfsense-utils.inc b/src/etc/inc/pfsense-utils.inc |index 7bd7a8d312..25667356c1 100644 |--- a/src/etc/inc/pfsense-utils.inc |+++ b/src/etc/inc/pfsense-utils.inc -------------------------- Patching file etc/inc/pfsense-utils.inc using Plan A... Hunk #1 failed at 1395. Hunk #2 failed at 1413. Hunk #3 failed at 1430. 3 out of 3 hunks failed while patching etc/inc/pfsense-utils.inc Hmm... The next patch looks like a unified diff to me... The text leading up to this was: -------------------------- |diff --git a/src/etc/inc/rrd.inc b/src/etc/inc/rrd.inc |index 3de2c7599f..1184ace017 100644 |--- a/src/etc/inc/rrd.inc |+++ b/src/etc/inc/rrd.inc -------------------------- Patching file etc/inc/rrd.inc using Plan A... Hunk #1 failed at 924. 1 out of 1 hunks failed while patching etc/inc/rrd.inc Hmm... The next patch looks like a unified diff to me... The text leading up to this was: -------------------------- |diff --git a/src/etc/inc/services.inc b/src/etc/inc/services.inc |index ae99278746..636d79680e 100644 |--- a/src/etc/inc/services.inc |+++ b/src/etc/inc/services.inc -------------------------- Patching file etc/inc/services.inc using Plan A... Hunk #1 failed at 50. Hunk #2 failed at 537. Hunk #3 failed at 635. Hunk #4 failed at 676. Hunk #5 failed at 750. Hunk #6 failed at 1656. Hunk #7 failed at 1697. 7 out of 7 hunks failed while patching etc/inc/services.inc Hmm... The next patch looks like a unified diff to me... The text leading up to this was: -------------------------- |diff --git a/src/etc/inc/system.inc b/src/etc/inc/system.inc |index 6464ed99a2..d6c18cee08 100644 |--- a/src/etc/inc/system.inc |+++ b/src/etc/inc/system.inc -------------------------- Patching file etc/inc/system.inc using Plan A... Hunk #1 failed at 419. Hunk #2 failed at 452. 2 out of 2 hunks failed while patching etc/inc/system.inc Hmm... The next patch looks like a unified diff to me... The text leading up to this was: -------------------------- |diff --git a/src/etc/inc/util.inc b/src/etc/inc/util.inc |index 30f402de1a..2f47c44c5b 100644 |--- a/src/etc/inc/util.inc |+++ b/src/etc/inc/util.inc -------------------------- Patching file etc/inc/util.inc using Plan A... Hunk #1 failed at 3476. 1 out of 1 hunks failed while patching etc/inc/util.inc Hmm... The next patch looks like a unified diff to me... The text leading up to this was: -------------------------- |diff --git a/src/etc/rc.filter_synchronize b/src/etc/rc.filter_synchronize |index d8ca448074..cee0339a47 100755 |--- a/src/etc/rc.filter_synchronize |+++ b/src/etc/rc.filter_synchronize -------------------------- Patching file etc/rc.filter_synchronize using Plan A... Hunk #1 failed at 126. 1 out of 1 hunks failed while patching etc/rc.filter_synchronize Hmm... The next patch looks like a unified diff to me... The text leading up to this was: -------------------------- |diff --git a/src/usr/local/pfSense/include/www/bandwidth_by_ip.inc b/src/usr/local/pfSense/include/www/bandwidth_by_ip.inc |index 52162c11a5..d6ccf3e804 100644 |--- a/src/usr/local/pfSense/include/www/bandwidth_by_ip.inc |+++ b/src/usr/local/pfSense/include/www/bandwidth_by_ip.inc -------------------------- Patching file usr/local/pfSense/include/www/bandwidth_by_ip.inc using Plan A... Hunk #1 failed at 77. 1 out of 1 hunks failed while patching usr/local/pfSense/include/www/bandwidth_by_ip.inc Hmm... The next patch looks like a unified diff to me... The text leading up to this was: -------------------------- |diff --git a/src/usr/local/www/services_dhcp.php b/src/usr/local/www/services_dhcp.php |index c06bdd36fd..7dc327a129 100644 |--- a/src/usr/local/www/services_dhcp.php |+++ b/src/usr/local/www/services_dhcp.php -------------------------- Patching file usr/local/www/services_dhcp.php using Plan A... Hunk #1 failed at 137. Hunk #2 failed at 630. 2 out of 2 hunks failed while patching usr/local/www/services_dhcp.php Hmm... The next patch looks like a unified diff to me... The text leading up to this was: -------------------------- |diff --git a/src/usr/local/www/services_dhcp_relay.php b/src/usr/local/www/services_dhcp_relay.php |index 2c921934ea..a9db5cb896 100644 |--- a/src/usr/local/www/services_dhcp_relay.php |+++ b/src/usr/local/www/services_dhcp_relay.php -------------------------- Patching file usr/local/www/services_dhcp_relay.php using Plan A... Hunk #1 failed at 76. 1 out of 1 hunks failed while patching usr/local/www/services_dhcp_relay.php Hmm... The next patch looks like a unified diff to me... The text leading up to this was: -------------------------- |diff --git a/src/usr/local/www/services_dhcpv6_relay.php b/src/usr/local/www/services_dhcpv6_relay.php |index 9c67c93e2c..7b3615cc12 100644 |--- a/src/usr/local/www/services_dhcpv6_relay.php |+++ b/src/usr/local/www/services_dhcpv6_relay.php -------------------------- Patching file usr/local/www/services_dhcpv6_relay.php using Plan A... Hunk #1 failed at 72. 1 out of 1 hunks failed while patching usr/local/www/services_dhcpv6_relay.php Hmm... The next patch looks like a unified diff to me... The text leading up to this was: -------------------------- |diff --git a/src/usr/local/www/status_dhcp_leases.php b/src/usr/local/www/status_dhcp_leases.php |index 518ef7aafa..338cac7ac0 100644 |--- a/src/usr/local/www/status_dhcp_leases.php |+++ b/src/usr/local/www/status_dhcp_leases.php -------------------------- Patching file usr/local/www/status_dhcp_leases.php using Plan A... Hunk #1 failed at 238. 1 out of 1 hunks failed while patching usr/local/www/status_dhcp_leases.php Hmm... The next patch looks like a unified diff to me... The text leading up to this was: -------------------------- |diff --git a/src/usr/local/www/status_dhcpv6_leases.php b/src/usr/local/www/status_dhcpv6_leases.php |index 37e3d241e9..3e43cd0308 100644 |--- a/src/usr/local/www/status_dhcpv6_leases.php |+++ b/src/usr/local/www/status_dhcpv6_leases.php -------------------------- Patching file usr/local/www/status_dhcpv6_leases.php using Plan A... Hunk #1 failed at 103. Hunk #2 failed at 312. Hunk #3 failed at 405. 3 out of 3 hunks failed while patching usr/local/www/status_dhcpv6_leases.php Hmm... The next patch looks like a unified diff to me... The text leading up to this was: -------------------------- |diff --git a/src/usr/local/www/widgets/widgets/wake_on_lan.widget.php b/src/usr/local/www/widgets/widgets/wake_on_lan.widget.php |index fdc06cab95..00bbdb9f72 100644 |--- a/src/usr/local/www/widgets/widgets/wake_on_lan.widget.php |+++ b/src/usr/local/www/widgets/widgets/wake_on_lan.widget.php -------------------------- Patching file usr/local/www/widgets/widgets/wake_on_lan.widget.php using Plan A... Hunk #1 failed at 141. 1 out of 1 hunks failed while patching usr/local/www/widgets/widgets/wake_on_lan.widget.php done
Crash report:
Crash report begins. Anonymous machine information: amd64 14.0-CURRENT FreeBSD 14.0-CURRENT #0 plus-RELENG_23_01-n256037-6e914874a5e: Fri Feb 10 20:30:29 UTC 2023 root@freebsd:/var/jenkins/workspace/pfSense-Plus-snapshots-23_01-main/obj/amd64/VDZvZksF/var/jenkins/workspace/pfSense-Plus-snapshots-23_01-main/sources/FreeBS Crash report details: PHP Errors: [25-Mar-2023 22:41:45 Europe/Berlin] 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 454 [25-Mar-2023 22:42:18 Europe/Berlin] 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 454 [25-Mar-2023 22:47:24 Europe/Berlin] 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 454 [25-Mar-2023 22:48:05 Europe/Berlin] 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 454 No FreeBSD crash data found.
-
That patch does apply cleanly to 23.01. So if it doesn't for you it's probably because you have another patch applied already that has changed the files already.
However that isn't the bug you're hitting. You are hitting this:
https://redmine.pfsense.org/issues/13719That should already be solved in 23.01-rel. Do you upgrade from a 23.01-dev snapshot?
Steve
-
@stephenw10 No I did a clean install.
-
Do you have any other patches already installed?
-
@stephenw10 I only installed the recommended patches. But not all are applied because of errors. One of them is the DHCP fix.
-
Something must have changed the box before you tried to apply the patches.
All of the recommended patches will apply to a clean install of 23.01.Did you restore a config with a different branch set maybe?
-
@stephenw10 No I didn't. After clean install I figured out that my fix was to edit one interface via console and enable DHCP on that interface again. Now I saw that the patch isn't working and the crashes are back.
There are 3 patches that are not applied.
-
@mrsunfire Not sure about your crashes/error but in your screenshot the "Fix default sorting of Aliases in lists" entry is not supposed to have a Revert button if "Fix default sorting of Aliases in lists (part 2)" is applied...part 2 would need to be reverted first. The other two do have a Revert button for me.
-
Yes, that's the only one that shouldn't be revertable though. The patches for 13966 13983 should be revertable.
-
@stephenw10 How can I diagnose this? For my understanding the files are different from what is expected. Line xyz seems to doesn't match. At least that's what the debug is saying "does look diff to me".
-
The fact you can't apply/revert those patches is not necessarily a problem.
None of those patches address the error you originally posted though. That should already be fixed in 23.01 so it looks like something might have regressed that fix.
https://redmine.pfsense.org/projects/pfsense/repository/1/revisions/c5c09acd9713a8e3ed3a553dc4d83daf4baf9502/diff/src/usr/local/www/services_dhcp.php