Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    New PHP Warning

    Scheduled Pinned Locked Moved WireGuard
    5 Posts 4 Posters 969 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T
      tquade
      last edited by

      Crash report begins. Anonymous machine information:

      amd64
      12.2-STABLE
      FreeBSD 12.2-STABLE devel-12-n226634-bdf0424cb2b5 pfSense

      Crash report details:

      PHP Errors:
      [25-May-2021 12:36:27 America/Regina] PHP Warning: Use of undefined constant wg_ - assumed 'wg_' (this will throw an Error in a future version of PHP) in /usr/local/www/wg/status_wireguard.php on line 86
      [25-May-2021 12:38:59 America/Regina] PHP Warning: Use of undefined constant wg_ - assumed 'wg_' (this will throw an Error in a future version of PHP) in /usr/local/www/wg/status_wireguard.php on line 86
      [25-May-2021 15:36:20 America/Regina] PHP Warning: Use of undefined constant wg_ - assumed 'wg_' (this will throw an Error in a future version of PHP) in /usr/local/www/wg/status_wireguard.php on line 86

      No FreeBSD crash data found.

      Ted

      JeGrJ 1 Reply Last reply Reply Quote 0
      • JeGrJ
        JeGr LAYER 8 Moderator @tquade
        last edited by JeGr

        @tquade That don't look like errors per se, but warnings because of PHP changed handling/syntax of defining constants. That's the "assumed..." part. Looks like @theonemcdonald has to adapt the status/UI PHP code a bit (in that case seems like putting the wg_ in simple quotes) to fit the change in PHP. Likely caused by new PHP version from upstream pulled into 2.6 devs.

        Also for reference: what version of the package are your running? I checked line 86 and can't find a constant defined there in the current codebase.

        Cheers
        \jegr

        Don't forget to upvote 👍 those who kindly offered their time and brainpower to help you!

        If you're interested, I'm available to discuss details of German-speaking paid support (for companies) if needed.

        cmcdonaldC 1 Reply Last reply Reply Quote 0
        • cmcdonaldC
          cmcdonald Netgate Developer @JeGr
          last edited by

          @jegr that bug was an oversight, it's fixed. Will be in the next build

          Need help fast? https://www.netgate.com/support

          yon 0Y 1 Reply Last reply Reply Quote 1
          • yon 0Y
            yon 0 @cmcdonald
            last edited by

            amd64
            12.2-STABLE
            FreeBSD 12.2-STABLE devel-12-n226637-10439d5c8a53 pfSense

            Crash report details:

            PHP Errors:
            [01-Jun-2021 09:15:32 Etc/GMT+8] PHP Warning: flock() expects parameter 1 to be resource, null given in /usr/local/pkg/wireguard/wg_service.inc on line 324
            [01-Jun-2021 09:15:32 Etc/GMT+8] PHP Warning: fclose() expects parameter 1 to be resource, null given in /usr/local/pkg/wireguard/wg_service.inc on line 327

            No FreeBSD crash data found.

            cmcdonaldC 1 Reply Last reply Reply Quote 0
            • cmcdonaldC
              cmcdonald Netgate Developer @yon 0
              last edited by

              @yon-0 thanks, this will be fixed in next build which I hope to have submitted to Netgate soon

              Need help fast? https://www.netgate.com/support

              1 Reply Last reply Reply Quote 0
              • First post
                Last post
              Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.