error-reporting

Win32: How to crash?

六眼飞鱼酱① 提交于 2019-12-08 08:12:06
问题 i'm trying to figure out where Windows Error Reports are saved; i hit Send on some earlier today, but i forgot that i want to "view the details" so i can examine the memory minidumps. But i cannot find where they are stored (and google doesn't know). So i want to write a dummy application that will crash, show the WER dialog, let me click "view the details" so i can get to the folder where the dumps are saved. How can i crash on Windows? Edit: The reason i ask is because i've tried

Disable E_STRICT errors in php.ini file still throws the errors

[亡魂溺海] 提交于 2019-12-08 07:17:30
问题 I'm trying to disable E_STRICT errors in my php.ini file but it still throws the error. I'm using PHP 5.4.10 with a MAMP (not PRO version). With phpinfo I've located the php.ini file in /Applications/MAMP/bin/php/php5.4.10/conf/php.ini I've changed: error_reporting = E_ALL to error_reporting = E_ALL & ~E_STRICT Then i've restarted Apache but it still throw the error, where I'm wrong? 回答1: Use error_reporting = E_ALL ^ E_STRICT . If you didn't have access to php.ini, you could put this in your

@ error suppression operator and set_error_handler

六眼飞鱼酱① 提交于 2019-12-06 17:11:57
问题 I am following good programming practices and I am logging the PHP errors to file instead of displaying it to user. I use set_error_handler() for that. Now the problem. For example, I have somewhere: @file_exists('/some/file/that/is/outside/openbasedir.txt'); But despite the error suppression operator, the error message logs. I don't want that. I want suppressed errors not to pass to my error handler. 回答1: The @ operator temporarily sets error_reporting to 0, so you can test the value of

Retrieving ADO errors using Delphi

岁酱吖の 提交于 2019-12-06 03:29:36
问题 I'm using Delphi 2007 with ADO to access a SQL Server 2008 database. A stored procedure on the database prevalidates the input and if the validation fails it returns an error result set (containing custom error info). Using SQL Server Management Studio, when I run the stored procedure, I get the custom error result set in one tab and the native error message in another. Back in my Delphi app, when I open the stored procedure, I can access the custom error result set. However, the Errors

How to change the way PHP writes errors in the error log file?

霸气de小男生 提交于 2019-12-05 16:23:35
I have been working on my website for over a year now, and I am very anxious to finally put it out there for people to use. It has gotten quite large however - I almost want to say out of my control - and on top of that I am really just an self taught amateur programmer. So I want to be sure, that any errors that php produces are logged in a file, so I can than access this file and track errors down. Currently my settings are the following: <?php error_reporting(E_ALL); ini_set('display_errors', '0'); ini_set('log_errors', 1); ini_set('error_log', 'errors.log'); ?> Works pretty good so far, my

PHP notice suppression; only certain circumstances/methods

ε祈祈猫儿з 提交于 2019-12-05 13:20:00
tl;dr - Is there an effective way to manage the error reporting level of PHP when working in a very strict environment, given certain processes would be made easier with a less strict level? Alright; first off, I don't believe "error suppression" is a solution. I ( am reasonably certain that I ) have never used the @ error suppression operator, and have no intention of doing so. I take advantage of set_error_handler() and ErrorException ( or some derivation of ) and I develop in an error_reporting(-1) ( future proof E_ALL | E_STRICT ) Now, I don't want to change these habits, as I find they

Enable errors in browser when parsing PHP-files

佐手、 提交于 2019-12-05 11:06:48
问题 I recently changed to a MacBook and now use the MAMP-stack for development locally. In my earlier development environment I always could see informative error-reports when I tried to access a PHP file through a web-browser and an error occurred. With the default installation of MAMP it seems that this feature is disabled, whenever I hit an error I can't see the cause of it, I can't even see a single line informing me that an error occurred. Not until I start to debug the code in a debugger I

Disable strict standards in PHP 5.3.8

我与影子孤独终老i 提交于 2019-12-05 02:24:25
问题 I am using strict standards option in PHP but I want to disable it because Joomla doesn't like it and I have to use Joomla on my localhost. In response to another question on this site, this solution was given: E_ALL & ~E_DEPRECATED & ~E_STRICT but this didn't work for me. I think it only works for PHP 5.4 while I am using 5.3.8. Can anyone tell me what I should use? I am currently using error_reporting(E_ALL & ~E_NOTICE) . Also I am using ini_set('display_errors') but there are still errors

Not displaying PHP errors [duplicate]

杀马特。学长 韩版系。学妹 提交于 2019-12-05 00:08:20
问题 This question already has answers here : How can I get useful error messages in PHP? (41 answers) Closed 5 years ago . I've boiled down the problem and made it clean so that it hopefully will be easier for you to help me. I have a very simple code: <?php echo "Hello world"; ?> This runs perfectly fine. If I run the following code (parse error) I do not get any errors but the text "Hello world" is still displayed: <?php echo "Hello world"; piwejfoiwjefoijwef ?> If I place the parse error

@ error suppression operator and set_error_handler

浪子不回头ぞ 提交于 2019-12-04 22:45:31
I am following good programming practices and I am logging the PHP errors to file instead of displaying it to user. I use set_error_handler() for that. Now the problem. For example, I have somewhere: @file_exists('/some/file/that/is/outside/openbasedir.txt'); But despite the error suppression operator, the error message logs. I don't want that. I want suppressed errors not to pass to my error handler. The @ operator temporarily sets error_reporting to 0, so you can test the value of error_reporting in your error handler: if (ini_get('error_reporting') == 0) { return; } Or even better, log only