Project

General

Profile

Actions

Regression #13581

closed

Feature #13446: Upgrade PHP from 7.4 to 8.1

Empty Dynamic DNS entry causes PHP errors in various contexts

Added by TyphooN . over 1 year ago. Updated over 1 year ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
PHP Interpreter
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
23.01
Release Notes:
Force Exclusion
Affected Version:
2.7.0
Affected Architecture:

Description

PHP Errors:
[20-Oct-2022 11:23:20 America/New_York] PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /etc/inc/auth.inc:199
Stack trace:
#0 /etc/inc/authgui.inc(27): include_once()
#1 /etc/inc/auth_check.inc(43): require_once('/etc/inc/authgu...')
#2 /usr/local/www/getstats.php(37): require_once('/etc/inc/auth_c...')
#3 {main}
thrown in /etc/inc/auth.inc on line 199
[20-Oct-2022 11:23:29 America/New_York] PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /etc/inc/auth.inc:199
Stack trace:
#0 /etc/inc/authgui.inc(27): include_once()
#1 /etc/inc/auth_check.inc(43): require_once('/etc/inc/authgu...')
#2 /usr/local/www/ifstats.php(33): require_once('/etc/inc/auth_c...')
#3 {main}
thrown in /etc/inc/auth.inc on line 199
[20-Oct-2022 11:30:08 America/New_York] PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /etc/inc/auth.inc:199
Stack trace:
#0 /etc/inc/authgui.inc(27): include_once()
#1 /etc/inc/auth_check.inc(43): require_once('/etc/inc/authgu...')
#2 /usr/local/www/getstats.php(37): require_once('/etc/inc/auth_c...')
#3 {main}
thrown in /etc/inc/auth.inc on line 199
[20-Oct-2022 11:30:16 America/New_York] PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /etc/inc/auth.inc:199
Stack trace:
#0 /etc/inc/authgui.inc(27): include_once()
#1 /etc/inc/auth_check.inc(43): require_once('/etc/inc/authgu...')
#2 /usr/local/www/ifstats.php(33): require_once('/etc/inc/auth_c...')
#3 {main}
thrown in /etc/inc/auth.inc on line 199

Actions #1

Updated by TyphooN . over 1 year ago

I get this error upon logging into the web interface. Unsure if it is related but the traffic graphs are no longer working.

Actions #2

Updated by TyphooN . over 1 year ago

I have 2 users that are in the admins group, if that is relevant.

Actions #3

Updated by Christian McDonald over 1 year ago

The line number seems to indicate that you might have RFC2136 dyndns client enabled? Can you share anything related to that part of the configuration?

Actions #4

Updated by Christian McDonald over 1 year ago

  • Release Notes changed from Default to Force Exclusion
  • Assignee set to Christian McDonald
Actions #5

Updated by TyphooN . over 1 year ago

I have unbound enabled because I am using pfblockerng - I am not using a dyndns client.

Actions #6

Updated by Ronald Schellberg over 1 year ago

I have been receiving this error too. No RFC2136 client enabled and no RFC2136 entries in the backup config file.

I get a similar errors related to dyndns configurations:
  • when I access the dyndns/RFC2136 page

    PHP Errors:
    [23-Oct-2022 08:11:47 America/Boise] PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/www/services_rfc2136.php:100
    Stack trace:
    #0 {main}
    thrown in /usr/local/www/services_rfc2136.php on line 100
  • or if I add a Dynamic dyndns client and enable the widget

    PHP Errors:
    [23-Oct-2022 08:33:58 America/Boise] PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/www/widgets/widgets/dyn_dns_status.widget.php:249
    Stack trace:
    #0 /usr/local/www/index.php(428): include()
    #1 {main}
    thrown in /usr/local/www/widgets/widgets/dyn_dns_status.widget.php on line 249
    [23-Oct-2022 08:34:19 America/Boise] PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/www/widgets/widgets/dyn_dns_status.widget.php:249
    Stack trace:
    #0 /usr/local/www/index.php(428): include()
    #1 {main}
    thrown in /usr/local/www/widgets/widgets/dyn_dns_status.widget.php on line 249

    this one is particularly bad, I have to recover a prior config to get the web interface to function again.
Actions #7

Updated by Jim Pingle over 1 year ago

  • Subject changed from pfSense 2.7 PHP Errors to PHP Errors during authentication
  • Target version set to 2.7.0
  • Parent task set to #13446
  • Plus Target Version set to 23.01
Actions #8

Updated by TyphooN . over 1 year ago

After upgrading to v2.7.0.a.20221209.0600 I am no longer experiencing this issue and can see the graphs.

Actions #9

Updated by Jim Pingle over 1 year ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100
Actions #10

Updated by TyphooN . over 1 year ago

Traffic graphs are still working but saw this error after updating this AM:

PHP ERROR: Type: 1, File: /etc/inc/auth.inc, Line: 199, Message: Uncaught TypeError: Cannot access offset of type string on string in /etc/inc/auth.inc:199
Stack trace:
#0 /etc/inc/authgui.inc(27): include_once()
#1 /etc/inc/auth_check.inc(43): require_once('/etc/inc/authgu...')
#2 /usr/local/www/getstats.php(37): require_once('/etc/inc/auth_c...')
#3 {main}
thrown @ 2022-12-12 08:39:18

Crash report begins. Anonymous machine information:

amd64
14.0-CURRENT
FreeBSD 14.0-CURRENT #0 devel-main-n255822-bd5b6c0d6cc: Mon Dec 12 06:31:54 UTC 2022 root@freebsd:/var/jenkins/workspace/pfSense-CE-snapshots-master-main/obj/amd64/Xs3V3Zm2/var/jenkins/workspace/pfSense-CE-snapshots-master-main/sources/FreeBSD-src-dev

Crash report details:

PHP Errors:
[12-Dec-2022 10:12:12 America/New_York] PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /etc/inc/auth.inc:199
Stack trace:
#0 /etc/inc/authgui.inc(27): include_once()
#1 /etc/inc/auth_check.inc(43): require_once('/etc/inc/authgu...')
#2 /usr/local/www/ifstats.php(33): require_once('/etc/inc/auth_c...')
#3 {main}
thrown in /etc/inc/auth.inc on line 199
[12-Dec-2022 10:12:19 America/New_York] PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /etc/inc/auth.inc:199
Stack trace:
#0 /etc/inc/authgui.inc(27): include_once()
#1 /etc/inc/auth_check.inc(43): require_once('/etc/inc/authgu...')
#2 /usr/local/www/getstats.php(37): require_once('/etc/inc/auth_c...')
#3 {main}
thrown in /etc/inc/auth.inc on line 199

No FreeBSD crash data found.

Actions #11

Updated by Jim Pingle over 1 year ago

Do you maybe have a blank entry under the RFC2136 tab for dynamic DNS? If so, delete it.
That's about the only way I can see it still producing an error at that line on current code.

Actions #12

Updated by Ronald Schellberg over 1 year ago

Jim Pingle wrote in #note-11:

Do you maybe have a blank entry under the RFC2136 tab for dynamic DNS? If so, delete it.
That's about the only way I can see it still producing an error at that line on current code.

As noted in #note-6, there aren't any entries in the RFC2136 page and when I reference the Page I get the PHP error. I have checked the backup config file again and don't find any references there. Do I need to rebuild the system? Any other methods to clear the table of a blank entry?

Update: Starting by resetting from factory defaults, I could not reproduce the RFC2136 error. However, my configuration includes a LAN gateway and static routes to that gateway, I could not enter the static routes because the gateway field would not populate. Tried multiple ways to enter the LAN gateway but never succeeded, the gateway field remained "-".

Another issue I was having restoring my configuration was with the certificate authority and its certificates, couldn't find a way to restore those separately.

Actions #13

Updated by Jim Pingle over 1 year ago

  • Subject changed from PHP Errors during authentication to Empty Dynamic DNS entry causes PHP errors in various contexts
  • Status changed from Resolved to In Progress
  • Assignee changed from Christian McDonald to Jim Pingle
  • % Done changed from 100 to 30

OK I can reproduce these errors but only with an empty entry in the configuration, such as:

        <dnsupdates>
                <dnsupdate>
                </dnsupdate>
        </dnsupdates>

Or:

        <dnsupdates>
                <dnsupdate/>
        </dnsupdates>

I found several places that can trigger errors the same way between traditional DynDNS entries and RFC2136 entries. Commit coming shortly.

Actions #14

Updated by Jim Pingle over 1 year ago

  • Status changed from In Progress to Feedback
  • % Done changed from 30 to 100
Actions #15

Updated by Ronald Schellberg over 1 year ago

Jim Pingle wrote in #note-13:

I found several places that can trigger errors the same way between traditional DynDNS entries and RFC2136 entries. Commit coming shortly.

Fixes the first item in #note-6. The widget still has issues:

PHP Errors:
[14-Dec-2022 10:07:28 America/Boise] PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/www/widgets/widgets/dyn_dns_status.widget.php:249
Stack trace:
#0 /usr/local/www/index.php(428): include()
#1 {main}
thrown in /usr/local/www/widgets/widgets/dyn_dns_status.widget.php on line 249
[14-Dec-2022 10:07:49 America/Boise] PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/www/widgets/widgets/dyn_dns_status.widget.php:249
Stack trace:
#0 /usr/local/www/index.php(428): include()
#1 {main}
thrown in /usr/local/www/widgets/widgets/dyn_dns_status.widget.php on line 249

Actions #16

Updated by Jim Pingle over 1 year ago

There is a second commit for the widget, e3d247ec

Actions #17

Updated by Ronald Schellberg over 1 year ago

Jim Pingle wrote in #note-16:

There is a second commit for the widget, e3d247ec

Fixes my issues with #13581. Thanks

Actions #18

Updated by Jim Pingle over 1 year ago

  • Status changed from Feedback to Resolved

I can't reproduce any of the original errors on a current snapshot now. This appears to be resolved.

Actions

Also available in: Atom PDF