error-reporting

Capturing raw HTTP POST Data during Exception

帅比萌擦擦* 提交于 2019-12-01 15:31:35
问题 I have a WCF Service hosted in IIS/ASP.NET that accepts HTTP Post ( not form post ) of serialized objects. If the client sends malformed requests (eg they're not serializing the object correctly) I'd like to log the message sent up. We're already using ELMAH to capture unhandled exceptions, so simply attaching the post data would be the easiest option. I can get the current HttpContext during an exception, however this does only contains the HTTP Header information. My question is this: Is

What's the point of E_ALL | E_STRICT if it's the same value as E_ALL?

自闭症网瘾萝莉.ら 提交于 2019-12-01 15:26:21
E_ALL equals 8191 ( 0001 1111 1111 1111 ) E_STRICT equals 2048 ( 0000 1000 0000 0000 ) Using bitwise OR to combine them: 1 1111 1111 1111 1000 0000 0000 We get the exact same value as the original E_ALL : 1 1111 1111 1111 What's the point of doing error_reporting(E_ALL | E_STRICT) if we can simply do error_reporting(E_ALL) to get the same thing? cletus You want: error_reporting(E_ALL | E_STRICT); E_ALL does not include E_STRICT (unless you are using PHP 5.4+). Your values are incorrect. From Predefined Constants E_ALL is defined as: All errors and warnings, as supported, except of level E

How do I get an error report from a “Please tell Microsoft about this” dialog?

孤街醉人 提交于 2019-12-01 08:39:12
A program I wrote crashes on startup. (Win XP). A dialog "Please tell Microsoft about this problem." appears. I want to be told about the problem since it's my app. Thing is, clicking through (clicking link: 'View the contents of the error report'), the "Error Report Contents" dialog doesn't let my customers copy its contents to the clipboard. Do you know how a user can get a copy of this report to forward to me, the developer? Don't worry. The developers can subscribe to WinQual. Microsoft will then forward the error reports to them. Windows Error Reporting is part of Microsoft's Winqual

How do I stop PHP output buffering from eating error messages?

不羁的心 提交于 2019-12-01 06:34:05
Well, now that I've gotten a bit further into it, I realize that this is a stupid question, and wrong. Turns out that the author of the legacy code I maintain was hi-jacking the error log to a different file with a php_init statement. The hi-jacking occurred at the same time as the output buffering was turned on, making it appear as though output buffering was throwing away my error messages. So, Mr. Moderator, feel free to delete this. Thanks to those who answered in good faith. Given the following PHP script: <?php error_log('test'); ob_start(); error_log('test2'); ob_end_flush(); ?> I get

How do I stop PHP output buffering from eating error messages?

喜欢而已 提交于 2019-12-01 04:48:22
问题 Well, now that I've gotten a bit further into it, I realize that this is a stupid question, and wrong. Turns out that the author of the legacy code I maintain was hi-jacking the error log to a different file with a php_init statement. The hi-jacking occurred at the same time as the output buffering was turned on, making it appear as though output buffering was throwing away my error messages. So, Mr. Moderator, feel free to delete this. Thanks to those who answered in good faith. Given the

What are differences between error_reporting(E_ALL) and error_reporting(E_ALL & ~E_NOTICE)

只谈情不闲聊 提交于 2019-11-30 20:18:03
Could anyone explain differences between error_reporting(E_ALL); and error_reporting(E_ALL & ~E_NOTICE); ? I noticed that when I change from E_ALL to E_ALL & ~E_NOTICE , an error which I was hacking, disappears. E_ALL is "everything" E_ALL & ~E_NOTICE is "everything except notices" Notices are the least-urgent kinds of messages. But they can be very useful for catching stupid programmer mistakes, like trying to read from a hash with a non-existent key, etc. (To understand the syntax, read up on bitwise operators) E_ALL would should all the error and warning and notice - everything E_NOTICE is

Turn error reporting ON xampp

蓝咒 提交于 2019-11-30 17:29:41
问题 So I have xampp and the thing won't report anything at all... I even forced an error and it didn't do anything... I used error_reporting(-1); ini_set( 'display_errors', 1 ); according to this document http://php.net/manual/en/function.error-reporting.php also error_reporting(E_ALL); doesn't do anything either... 回答1: Hey look at that, made a more insane error making code and it works... but why isn't it showing all errors? Probably you're not getting any 'simple' errors like: Parse error:

Does PHP error_reporting(0) affect error logging, or just display?

你离开我真会死。 提交于 2019-11-30 12:45:46
Does error_reporting(0); have any effect on error logging (to file), or does it just suppress on-screen error display? Thanks. Yes, it affects both. The error_reporting level defines what levels of errors gets triggered . Whether you log or display those errors are determined by the other settings. To summarize: error_reporting : What levels of errors get triggered. display_errors : Whether to show triggered errors in script output. log_errors : Whether to write triggered errors to a log. In essence, setting error_reporting(0) means that you've turned off error reporting, and nothing will be

What are the reasons why PHP would echo errors, even with error_reporting(0)?

て烟熏妆下的殇ゞ 提交于 2019-11-30 12:11:57
What are some reasons why PHP would force errors to show, no matter what you tell it to disable? I have tried error_reporting(0); ini_set('display_errors', 0); with no luck. Note the caveat in the manual at http://uk.php.net/error_reporting : Most of E_STRICT errors are evaluated at the compile time thus such errors are not reported in the file where error_reporting is enhanced to include E_STRICT errors (and vice versa). If your underlying system is configured to report E_STRICT errors, these may be output before your code is even considered. Don't forget, error_reporting/ini_set are runtime

How can I capture all exceptions from a wxPython application?

眉间皱痕 提交于 2019-11-30 05:25:05
I'm writing a little debug app for a bit of kit we're developing and I'd like to roll it out to a few users to see if they can provoke any crashes. Does anyone know a way of effectively wrapping a wxPython app to catch any and all unhandled exceptions that would cause the app to crash? Ideally I'd want to capture all output (not just errors) and log it to a file. Any unhandled exceptions ought to log to the current file and then allow the exception to pass on as per usual (i.e. the logging process ought to be transparent). I'm sure someone must have done something along these lines before, but