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

New PHP Warning

Scheduled Pinned Locked Moved WireGuard
5 Posts 4 Posters 968 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 May 25, 2021, 9:41 PM

    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

    J 1 Reply Last reply May 25, 2021, 10:32 PM Reply Quote 0
    • J
      JeGr LAYER 8 Moderator @tquade
      last edited by JeGr May 25, 2021, 10:38 PM May 25, 2021, 10:32 PM

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

      C 1 Reply Last reply May 26, 2021, 12:59 AM Reply Quote 0
      • C
        cmcdonald Netgate Developer @JeGr
        last edited by May 26, 2021, 12:59 AM

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

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

        Y 1 Reply Last reply Jun 1, 2021, 5:22 PM Reply Quote 1
        • Y
          yon 0 @cmcdonald
          last edited by Jun 1, 2021, 5:22 PM

          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.

          C 1 Reply Last reply Jun 1, 2021, 6:59 PM Reply Quote 0
          • C
            cmcdonald Netgate Developer @yon 0
            last edited by Jun 1, 2021, 6:59 PM

            @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
            5 out of 5
            • First post
              5/5
              Last post
            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
              This community forum collects and processes your personal information.
              consent.not_received