If this is your first visit, check our documentation. To post, register or login.
Forums / Community Contributed Add-Ons / Addon Admin Tools / Support Thread: Report All Errors (Even Warnings)

Support Thread: Report All Errors (Even Warnings)

Started by lat9 on 3 Dec 2013, 6:07 PM · Views: 14,888

Results 21 to 35 of 35
15 Nov 2016, 6:40 PM
#21
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Post #21 by drbyte

Probably need to apply this && to & fix: https://github.com/zencart/zencart/pull/1144/files

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

15 Nov 2016, 8:24 PM
#22
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,144
Plugin Contributions:
56

Post #22 by lat9

Thanks, DrByte! I've incorporated those changes and uploaded v2.0.3 of ***Report All Errors ***to the plugins.

16 Nov 2016, 12:26 AM
#23
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Location:
Alberta, Canada
Posts:
4,572
Plugin Contributions:
0

Post #23 by website_rob

With && fix applied, there are still PHP Notices being shown when using the module.

I guess I misunderstood about Notices being disabled as I can see in Configuration -> Logging it states:
Do you want create debug-log files for all PHP errors, even warnings,

Perhaps disabling Notices can be a feature in a future version? :smile:

The learning is in the doing.

Potent Products

17 Nov 2016, 2:42 PM
#24
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,144
Plugin Contributions:
56

Post #24 by lat9

Website Rob:

With && fix applied, there are still PHP Notices being shown when using the module.

I guess I misunderstood about Notices being disabled as I can see in Configuration -> Logging it states:
Do you want create debug-log files for all PHP errors, even warnings,

Perhaps disabling Notices can be a feature in a future version? :smile:
With the change, notices should (by default) not be logged when Report All Errors is disabled, with only Error and Warning type issues being logged. The (even warnings) addition in the plugin's name should, thus, just be ignored.

19 Nov 2016, 4:47 AM
#25
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Location:
Alberta, Canada
Posts:
4,572
Plugin Contributions:
0

Post #25 by website_rob

I can confirm that when All Errors features are disabled, no PHP Notices are recorded / shown when the fix mentioned earlier by Dr. Byte has been applied.

If you want the module other features they need to be manually enabled.

Admin -> Configuration -> Logging
Report All Errors (Admin)?
Report All Errors (Store)?
Report All Errors: Backtrace on Notice Errors?

And that is when PHP Notices will also be recorded / shown.

In continued testing I noticed something not mentioned in the module documentation. In v2.0.2 (v2.0.3 is not available as of today's date) I did not read anywhere that the module is enabled by default and will record / display only error(s). That was a pleasant surprize and exactly what I was looking for.

Also, I know at one time it was possible for PHP to also state at what character in the line the error found. Not sure if that is possible anymore but be nice to have again.

The learning is in the doing.

Potent Products

24 Nov 2016, 2:14 PM
#26
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,144
Plugin Contributions:
56

Post #26 by lat9

v2.0.3 is now available for download from the Plugins area.

28 Dec 2017, 5:33 PM
#27
lordzoabar avatar

lordzoabar

New Zenner

Join Date:
Nov 2017
Location:
Athens, Georgia, USA
Posts:
104
Plugin Contributions:
0

Post #27 by lordzoabar

Not sure if I missed it in the thread or not, but when I installed it, both my admin and live site were replaced with a page listing all the errors. Decent little heart attack there, until I disabled the actual php files (just added ~ at the end of them all), but I did save the generated log. Came back with close to 1000 undefined and already defined index and constants, plus a smattering of others. I saw the notice about the already defined ones, but what about all the undefined? My site WORKS... but that's still a LOT of errors that came up...

28 Dec 2017, 5:45 PM
#28
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,144
Plugin Contributions:
56

Post #28 by lat9

Lordzoabar:

Not sure if I missed it in the thread or not, but when I installed it, both my admin and live site were replaced with a page listing all the errors. Decent little heart attack there, until I disabled the actual php files (just added ~ at the end of them all), but I did save the generated log. Came back with close to 1000 undefined and already defined index and constants, plus a smattering of others. I saw the notice about the already defined ones, but what about all the undefined? My site WORKS... but that's still a LOT of errors that came up...
What version of Zen Cart and PHP are you using?

Report All Errors does, as you indicated, have a setting to "not report" those already-defined constants. Those issues are *normally *due to the way that Zen Cart handles cascading language files, e.g. the file /includes/languages/english.php gets loaded in addition to /includes/languages/YOUR_TEMPLATE/english.php. Those reports do not pose any current issue.

The reports of undefined constants are, however, of concern. PHP 7.2's release indicates that the use of undefined constants is deprecated, and will result in an error in a future PHP version. That said, I'd focus my inspection on those reports!

28 Dec 2017, 7:09 PM
#29
lordzoabar avatar

lordzoabar

New Zenner

Join Date:
Nov 2017
Location:
Athens, Georgia, USA
Posts:
104
Plugin Contributions:
0

Post #29 by lordzoabar

lat9:

What version of Zen Cart and PHP are you using?

Zen Cart 1.5.5d, and PHP 5.4.45

I've broken down the main log file, into multiple, individual files based on which php file is in question, but the website has been around longer than I have been with the company, so there is a lot of stuff to shift through, and (unfortunately) there was never a "sandbox" version of the store set up to safely test any fixes in.

28 Dec 2017, 7:37 PM
#30
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,144
Plugin Contributions:
56

Post #30 by lat9

Any reason the store is still on that oldy-moldy version of PHP?

Creating a sandbox site is pretty easy; if you're interested, please start a new forum thread so we don't muddy-up this plugin's support thread.

17 Mar 2019, 7:38 PM
#31
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,144
Plugin Contributions:
56

Post #31 by lat9

I've just submitted v3.0.0 of Report All Errors to the Zen Cart plugins for review; once approved, it can be downloaded from this link (https://www.zen-cart.com/downloads.php?do=file&id=1792).

This version uses the common admin/storefront processing now provided by zc156 as its change-basis.

21 Mar 2019, 7:24 PM
#32
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,144
Plugin Contributions:
56

Post #32 by lat9

lat9:

I've just submitted v3.0.0 of Report All Errors to the Zen Cart plugins for review; once approved, it can be downloaded from this link (https://www.zen-cart.com/downloads.php?do=file&id=1792).

This version uses the common admin/storefront processing now provided by zc156 as its change-basis.
v3.0.0 is now available for download!

23 Oct 2019, 9:49 AM
#33
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,880
Plugin Contributions:
7

Post #33 by torvista

A bit off-topic, but may be of interest....

I spent months of working locally (xampp, whatever the latest version is this week) diligently swatting the nit-picking debugs raised by this plugin, and even more diligently reporting them if not already fixed in ZC157, to ensure that all would be well when upgrading my site to ZC156 and php7.3.x. and I would not be swamped with a barrage of php errors.

I tested it on another domain from the same hosting service @php7.3, since I had to maintain the current site @php7.1, assuming that real hosting would show up more stuff, but all was clear there (I have an obsession with keeping all testing well away from the production site, not even on the same server).

Then, post upgrade on the real domain...rapidly a barrage of php notices appeared which I have just finished working through.
All were the usual undefined variables/offsets, some due to mangled urls being used by spiders so they could not be predicted, and some already fixed in ZC57.
But some were typical that should have showed up in local testing.

Comparing error_reporting values I see the production server is different, but for local, not master, which confuses me since as far as I know, that is determined in the fileset, which is identical across three servers.

Local / Master
xampp
32767 / 32767

hosting test
32767 / 32759

hosting production
22519 / 32759

So, not a question as such, but a reminder (to me mainly) that there is no substitute for final testing in parallel/on the same server, and to point out that you should upgrade early in the day, in a darkened room, ready for battle!!

And that having this plugin permanently enabled may still not catch everything!

Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

23 Jan 2020, 12:01 PM
#34
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,144
Plugin Contributions:
56

Post #34 by lat9

I've just submitted v3.1.0 of Report All Errors to the Zen Cart moderators for review and will post back here when it's available for download.

This release contains the change associated with GitHub issue #9, now collecting reported errors into per-page-load files that identify the error(s)' severity.

1 Feb 2020, 4:42 PM
#35
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,144
Plugin Contributions:
56

Post #35 by lat9

lat9:

I've just submitted v3.1.0 of Report All Errors to the Zen Cart moderators for review and will post back here when it's available for download.

This release contains the change associated with GitHub issue #9, now collecting reported errors into per-page-load files that identify the error(s)' severity.
Now available for download: https://www.zen-cart.com/downloads.php?do=file&id=1792