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

PHP Errors after latest update (amd64) built on Thu Jun 11 13:02:15 EDT 2020

2.5 Development Snapshots (Retired)
4
22
1.5k
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.
  • R
    rpsmith
    last edited by Jun 13, 2020, 10:41 PM

    2.5.0.a.20200613.1250

    PHP Errors:
    [13-Jun-2020 17:39:20 America/Chicago] PHP Warning: Invalid argument supplied for foreach() in /etc/rc.dyndns.update on line 52

    1 Reply Last reply Reply Quote 0
    • B
      bmeeks
      last edited by Jun 14, 2020, 1:13 AM

      You guys will likely get more traction with these error reports if you open a Redmine Bug Report here: https://redmine.pfsense.org/. There is no guarantee that a pfSense developer closely follows this forum on a daily basis. They do look in from time to time, but the Redmine Bug site is the offical reporting and tracking mechanism for pfSense bugs.

      1 Reply Last reply Reply Quote 1
      • R
        rpsmith
        last edited by Jun 14, 2020, 6:16 AM

        Thanks! I was beginning to wonder if this was the correct place to report bugs. Regards, Roy...

        1 Reply Last reply Reply Quote 0
        • R
          rpsmith
          last edited by Jun 14, 2020, 10:51 AM

          No more PHP Errors after the last 2 updates! Many Thanks to the Coders! Regards, Roy...

          ? N 2 Replies Last reply Jun 14, 2020, 3:35 PM Reply Quote 0
          • ?
            A Former User @rpsmith
            last edited by Jun 14, 2020, 3:35 PM

            Added a comment to Issue #9435 which created the offending code, whether it should be a new Issue or reopening #9435 I'll leave to pfSense developers.

            ? 1 Reply Last reply Jun 14, 2020, 9:24 PM Reply Quote 1
            • N
              NollipfSense @rpsmith
              last edited by Jun 14, 2020, 5:16 PM

              @rpsmith said in PHP Errors after latest update (amd64) built on Thu Jun 11 13:02:15 EDT 2020:

              No more PHP Errors after the last 2 updates! Many Thanks to the Coders! Regards, Roy...

              Still getting it here!

              login-to-view

              pfSense+ 23.09 Lenovo Thinkcentre M93P SFF Quadcore i7 dual Raid-ZFS 128GB-SSD 32GB-RAM PCI-Intel i350-t4 NIC, -Intel QAT 8950.
              pfSense+ 23.09 VM-Proxmox, Dell Precision Xeon-W2155 Nvme 500GB-ZFS 128GB-RAM PCIe-Intel i350-t4, Intel QAT-8950, P-cloud.

              1 Reply Last reply Reply Quote 1
              • B
                bmeeks
                last edited by bmeeks Jun 14, 2020, 5:32 PM Jun 14, 2020, 5:28 PM

                This particular error you guys are receiving is actually a PHP Warning and is non-fatal. It is due to changes in PHP made in version 7.x that came out quite some time back. Trying to iterate an uninitialized PHP array is what generates this warning message. Older versions of PHP would, when presented with an uninitialized array, initialize an empty array on-the-fly for you and then iterate it (returning zero items because the array was empty, but key for us now was it would return no warning message either). For some reason the PHP crew upstream decided the new method from 7.x forward would be to throw a warning (and in later versions a fatal error) when this condition was encountered. So instead of creating an empty uninitialized array for you, the new PHP would throw this warning message for now. And in later PHP versions the plan is to make the error fatal.

                There are many instances in the pfSense GUI code where PHP arrays are created and iterated. There was a concentrated effort right as PHP 7.x was being included in pfSense to find all of the potential problem areas with access of uninitialized arrays and fix them. Some of the problem areas still managed to slip through, though. There is also the case where it is a result of a particular user's config.xml file content that triggers the error. Explaining how and why gets a little deep into the weeds, but the short version is this particular warning message/error is hard to totally stamp out.

                Report your findings on the Redmine site I linked in my ealier post and give any potentially relevant information such as "I once had a dynamic DNS client configured, but deleted it", or "I had a dynamic DNS cilent configured and changed/edited it", or whatever. It will help the developers track down the cause faster the more information you can give them.

                N 1 Reply Last reply Jun 15, 2020, 2:47 AM Reply Quote 1
                • R
                  rpsmith
                  last edited by Jun 14, 2020, 8:11 PM

                  Thank you Sir! It's frustrating when you post about the same error over many days and no one takes the time to acknowledge the problem or point you in the proper direction.

                  Thanks again bmeeks! Roy...

                  1 Reply Last reply Reply Quote 0
                  • ?
                    A Former User @A Former User
                    last edited by Jun 14, 2020, 9:24 PM

                    @rschell said in PHP Errors after latest update (amd64) built on Thu Jun 11 13:02:15 EDT 2020:

                    Added a comment to Issue #9435 which created the offending code, whether it should be a new Issue or reopening #9435 I'll leave to pfSense developers.

                    @vktg revised the commit to #9435. I manually updated rc.dyndns.update and the crash no longer occurs for me.

                    1 Reply Last reply Reply Quote 1
                    • R
                      rpsmith
                      last edited by Jun 14, 2020, 10:16 PM

                      updated it with what?

                      1 Reply Last reply Reply Quote 0
                      • ?
                        A Former User
                        last edited by Jun 14, 2020, 10:20 PM

                        Pull Request #4356

                        login-to-view

                        1 Reply Last reply Reply Quote 1
                        • R
                          rpsmith
                          last edited by Jun 14, 2020, 10:56 PM

                          I guess what you're saying is remove the old line 52, 53 and 54 and replace them with the new lines that start with a + (i guess you can tell I'm not a programmer).

                          Why would I not get an updated version of this file when I do a normal update from the dashboard? Roy...

                          B 1 Reply Last reply Jun 14, 2020, 11:11 PM Reply Quote 0
                          • B
                            bmeeks @rpsmith
                            last edited by bmeeks Jun 14, 2020, 11:20 PM Jun 14, 2020, 11:11 PM

                            @rpsmith said in PHP Errors after latest update (amd64) built on Thu Jun 11 13:02:15 EDT 2020:

                            I guess what you're saying is remove the old line 52, 53 and 54 and replace them with the new lines that start with a + (i guess you can tell I'm not a programmer).

                            Why would I not get an updated version of this file when I do a normal update from the dashboard? Roy...

                            What @rschell posted is called a diff patch. It shows what lines of code are to be deleted and what new lines are to be added in their place.

                            Specifically, what is shown in his post is the Pull Request from Viktor. A Pull Request is a formal code edit that is submitted by a developer to the "keeper" of the official code for review and eventual approval and inclusion in the master code base. So this Pull Request is awaiting approval. Once approved, it will be "merged" into the master code branch for pfSense-2.5 and will appear in the next snapshot published after the Pull Request is accepted by the code maintainer. At that point, when you install that new snapshot update, you will get the "fixed" file on your system.

                            In the meantime, you can perform your own edits if you desire. But if you are not a seasoned programmer and familiar with diff patches and PHP in particular, I would suggest waiting for the publication of the official snapshot release that contains that fix. A wrong edit saved to the file can quickly turn a non-fatal warning message into a fatal PHP error that breaks the firewall GUI.

                            1 Reply Last reply Reply Quote 2
                            • R
                              rpsmith
                              last edited by Jun 14, 2020, 11:32 PM

                              It doesn't seem to be causing any real problem other than the warning message so I think I'll take your advice and just wait for it to be included in a future snapshot.

                              Thanks bmeeks! Roy...

                              1 Reply Last reply Reply Quote 0
                              • N
                                NollipfSense @bmeeks
                                last edited by Jun 15, 2020, 2:47 AM

                                @bmeeks said in PHP Errors after latest update (amd64) built on Thu Jun 11 13:02:15 EDT 2020:

                                There is also the case where it is a result of a particular user's config.xml file content that triggers the error.

                                Actually, I had been thinking along those lines, especially, since it's continuing to occur. I can wait out the annoyance of the dashboard screaming crash, whenever I visit.

                                pfSense+ 23.09 Lenovo Thinkcentre M93P SFF Quadcore i7 dual Raid-ZFS 128GB-SSD 32GB-RAM PCI-Intel i350-t4 NIC, -Intel QAT 8950.
                                pfSense+ 23.09 VM-Proxmox, Dell Precision Xeon-W2155 Nvme 500GB-ZFS 128GB-RAM PCIe-Intel i350-t4, Intel QAT-8950, P-cloud.

                                1 Reply Last reply Reply Quote 0
                                • R
                                  rpsmith
                                  last edited by Jun 16, 2020, 9:40 AM

                                  Looks like the new code finally made it in to the current snapshot! Thanks to everyone for all the help and a special thanks to the Coders!

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