Error Reporting 2047 8
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us 'php_value error_reporting' Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community php error reporting 32767 Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Numeric values php error_reporting of error reporting levels up vote 8 down vote favorite 8 I'm checking the configuration of my PHP server and I need to set the following parameter as follows: error_reporting set to E_ALL & ~E_NOTICE However on my server a numeric value is set: error_reporting 6135 6135 I was wondering what's the meaning of it, and if I really need to change it thanks php share|improve this question edited Sep 21 '10 at 8:21 abatishchev 57k56214353 asked Sep 21 '10 at 8:12 Patrick 13.4k70218413 2 errr that title is confusing –lock Sep 21 '10 at 8:14 Either none of this makes any sense at all, or it's time for me to go to bed. –JAL Sep 21 '10 at 8:15 add a comment| 6 Answers 6 active oldest votes up vote 11 down vote accepted From the page we have: E_ALL has the value 30719 in PHP 5.3.x, 6143 in PHP 5.2.x, 2047 previously E_NOTICE has the value 8 Looks like you are using PHP 5.2.x Now If you do E_ALL & ~E_NOTICE Which is bitwise complement of E_NOTICE followed by bitwise anding with E_ALL we get 6143 & (~8) = 6135 share|improve this answer answered Sep 21 '10 at 8:20 codaddict 251k50362443 add a comment| up vote 13 down vote Values used for error reporting E_RECOVERABLE_ERROR 4096 + E_USER_NOTICE 1024 + E_USER_WARNING 512 + E_USER_ERROR 256 + E_COMPILE_WARNING 128 + E_COMPILE_ERROR 64 + E_CORE_WARNING 32 + E_CORE_ERROR 16 + E_PARSE 4 + E_WARNING 2 + E_ERROR 1 + = 6135 share|improve this answer answered Sep 21 '10 at 8:18 Mark Baker 143k19199266 Exactly what I was looking for, (of course) I couldn't find them in the php.net docs. Cheers! –Christopher Woods Feb 7 '13 at 23:18 nice to have this one when seeing something like error_reporting(7) –JSmyth Sep 10 at 2:55 add a comment| up vote 6 down vote The error flags are power of 2 integers so you can combine them using bit operators. The result is an integer like the one you see so if you set it to E_ALL & ~E_NOTICE it will still end up as integer. What flags comprise the 6135 value depends on your php version. You can check if a flag is contained within it using the bitwise
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Drupal Answers Questions Tags Users Badges Unanswered Ask Question _ Drupal Answers is a question and answer site for Drupal developers and administrators. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top Override default php settings up vote 0 http://stackoverflow.com/questions/3758418/numeric-values-of-error-reporting-levels down vote favorite I am having difficulties in overriding the default PHP settings within my Drupal installation. I do not want Drupal to display E_NOTICE messages. So I wanted to override the default PHP error_reporting setting from E_ALL to E_ALL & ~E_NOTICE or from 2047 to 2039 (the corresponding error reporting values). I added the line ini_set('error_reporting', 2039); in both sites/default/settings.php and sites/default/default.settings.php, but still when I go the status report page and view http://drupal.stackexchange.com/questions/25652/override-default-php-settings the PHP info file, I see the error reporting setting of PHP is still set to 2047. What am I doing wrong here? How to override the php setting? PS: I even tried adding the line php_value error_reporting 2039 to Drupal's .htaccess file, but there is no effect. settings.php share|improve this question edited Apr 16 '12 at 19:36 espero 396210 asked Mar 16 '12 at 7:01 Vivek 197311 Do you get any error message about ini_set() being disabled? Did you verify it is not disabled? Notice that you should not touch the default.settings.php. Drupal doesn't use that file when running; it is just used to create the settings.php file when installing Drupal. –kiamlaluno♦ Sep 25 '12 at 2:23 How about putting this log_errors = Off in your .htaccess –ninjascorner Sep 25 '12 at 6:32 add a comment| 1 Answer 1 active oldest votes up vote 1 down vote accepted You will have to add error_reporting(E_ALL ^ E_NOTICE); to the settings.php file. Here's more. share|improve this answer answered Mar 16 '12 at 7:04 karthik 9861123 Thanks for your answer. But it is not working.. The setting remains the same. –Vivek Mar 16 '12 at 7:43 do you mean that the Notice's are still displayed? But it works fine on mine. D7 btw. –kar
Frequently Asked Questions Enquire Careers Portfolio Contact Us Blog Where you are: Home Blog Web Development Basic PHP Error Reporting Techniques Basic PHP Error Reporting http://www.hiddenwebgenius.com/blog/web-development/basic-php-error-reporting-techniques/ Techniques Every program written is susceptible to bugs and errors. No programming language is bug-proof or error-proof. However, the occurrence of these bugs and errors can be cached, error-trapped and de-bugged. https://books.google.com/books?id=McRT5V5q5GQC&pg=PA204&lpg=PA204&dq=error+reporting+2047+8&source=bl&ots=X2utTqKeam&sig=19Gt7F-8Y86czK10NOGyoikhojs&hl=en&sa=X&ved=0ahUKEwj7vMrk29LPAhUr54MKHaDnCtgQ6AEIUzAI Following are basic techniques on how to display PHP error messages: The importance of error messages Error messages are very convenient for debugging as they display the exact line of code error reporting that’s causing the error. Note: Make sure to disable error reporting when you’re site’s about to go live. You don’t want visitors to see the backend error. These error messages expose the vulnerable part of your site which may be used by malicious visitors as an entry point to hack and exploit your website. Turning on error reporting in PHP The php.ini file error reporting 2047 is set default configuration values. display_errors = Off Error_reporting = E_ALL The display_errors variable tells PHP whether or not to display errors. Simply change the value to “On” when developing a PHP program. Error_reporting with an “E_ALL” value tells the server to display everything - from harmless warnings to bad coding practices, to actual coding errors. If you only want to display the “bad coding practices” warnings and the actual errors, but not those harmless coding notices, you can set Error_reporting value to E_ALL & ~E_NOTICE. Ideally the error reporting settings should be: display_errors = ON error_reporting = E_ALL & ~E_NOTICE For the changes to take effect, restart APACHE. Enabling server-level error reporting There are times when turning on error reporting in PHP may not work as you may have multiple versions of PHP installed in your computer. It is possible that APACHE is not recognizing the recently configured php.ini file as it is already pointing to one of the php.ini files in your computer. To avoid glitches like this, you can set the error reporting variables on server-level. Configuring error reporting on the APACHE serv
- Take your PHP programming skills to the next level, with this hands-on, example-rich tutorial! In Advanced PHP for Web Professionals, best-selling PHP author Christopher Cosentino brings together dozens of powerful new techniques for building serious Web applications. Learn how to manage sessions more...https://books.google.ru/books/about/Advanced_PHP_for_Web_Professionals.html?hl=ru&id=McRT5V5q5GQC&utm_source=gb-gplus-shareAdvanced PHP for Web ProfessionalsМоя библиотекаСправкаРасширенный поиск книгПолучить печатную версиюНет электронной версииPrentice Hall ProfessionalBoleroOzon.ruBooks.ruНайти в библиотекеВсе продавцы»Книги в Google PlayВ нашем крупнейшем в мире магазине представлены электронные книги, которые можно читать в браузере, на планшетном ПК, телефоне или специальном устройстве.Перейти в Google Play »Advanced PHP for Web ProfessionalsChristopher CosentinoPrentice Hall Professional, 2003 - Всего страниц: 339 2 Отзывыhttps://books.google.ru/books/about/Advanced_PHP_for_Web_Professionals.html?hl=ru&id=McRT5V5q5GQCTake your PHP programming skills to the next level, with this hands-on, example-rich tutorial! In Advanced PHP for Web Professionals, best-selling PHP author Christopher Cosentino brings together dozens of powerful new techniques for building serious Web applications. Learn how to manage sessions more effectively, create better forms, develop custom error handlers, build database-independent Web applications with PEAR::DB, parse XML files, authenticate users via database query, build cross-platform client apps with PHP-GTK