PHP Errors after latest update (amd64) built on Thu Jun 11 13:02:15 EDT 2020
-
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.
-
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...
-
@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.
-
updated it with what?
-
Pull Request #4356
-
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...
-
@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.
-
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...
-
@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.
-
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!