Project

General

Profile

Actions

Regression #13581

closed
T. JP

Feature #13446: Upgrade PHP from 7.4 to 8.1

Empty Dynamic DNS entry causes PHP errors in various contexts

Regression #13581: Empty Dynamic DNS entry causes PHP errors in various contexts

Added by TyphooN . almost 4 years ago. Updated almost 4 years 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

T. Updated by TyphooN . almost 4 years ago Actions #1

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

T. Updated by TyphooN . almost 4 years ago Actions #2

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

CM Updated by Christian McDonald almost 4 years ago Actions #3

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?

CM Updated by Christian McDonald almost 4 years ago Actions #4

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

T. Updated by TyphooN . almost 4 years ago Actions #5

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

RS Updated by Ronald Schellberg almost 4 years ago Actions #6

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.

JP Updated by Jim Pingle almost 4 years ago Actions #7

  • 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

T. Updated by TyphooN . almost 4 years ago Actions #8

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

JP Updated by Jim Pingle almost 4 years ago Actions #9

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

T. Updated by TyphooN . almost 4 years ago Actions #10

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.

JP Updated by Jim Pingle almost 4 years ago Actions #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.

RS Updated by Ronald Schellberg almost 4 years ago Actions #12

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.

JP Updated by Jim Pingle almost 4 years ago Actions #13

  • 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.

JP Updated by Jim Pingle almost 4 years ago Actions #14

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

Applied in changeset commit:00d3003d9aad824e4d51dd908c234ffebd5a3516.

RS Updated by Ronald Schellberg almost 4 years ago Actions #15

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

JP Updated by Jim Pingle almost 4 years ago Actions #16

There is a second commit for the widget, commit:e3d247ec

RS Updated by Ronald Schellberg almost 4 years ago Actions #17

Jim Pingle wrote in #note-16:

There is a second commit for the widget, commit:e3d247ec

Fixes my issues with #13581. Thanks

JP Updated by Jim Pingle almost 4 years ago Actions #18

  • 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