Drupal 7 Enable Error Reporting
Contents |
all over the world. Join today Community Documentation Community Docs Home Develop for Drupal Theming Guide Glossary Contribute to Docs Blank pages or "white screen of death" (WSOD) Last updated August 22, 2016. Created on July 10, 2007.Edited by rhuffstedtler, Ayesh, Sutharsan, drupal turn on error reporting lolandese. Log in to edit this page.Occasionally a site user or developer will navigate to
Enable Error Reporting In Php
a page and suddenly the page content disappears, and it becomes blank. No content. No errors. Nothing. This happens sometimes, It could happen after php enable error reporting ini_set updating a module, theme, or Drupal core. This is what is referred to by most members of the Drupal community as the White Screen of Death or WSOD. There are several reasons why this might occur, and therefore
Php Enable Error Reporting On Page
several possible solutions to the issue. (Note: The suggestions on this page might solve the problem even when you do not get the WSOD as it relates to an Internal Server Error.) "Invisible" Errors If error reporting is turned off, you could be getting a fatal error but not seeing it. On a production site, it is common to have error reporting turned off. If that is the case and PHP has hit an unrecoverable error, neither an drupal 7 wsod error nor content will be displayed, therefore you end up with a completely blank page. What you can do about this is either turn on PHP error reporting so it displays a message on the page itself, or check your log files (from the server) to look for the error. How to do both of these are explained below. Enable Error Reporting Although it may be turned off on commercial hosts and production sites (for good reason, so that users do not see the errors), these errors are one of your best tools for troubleshooting. To enable error reporting, temporarily edit your index.php file (normally located in your root directory) directly after the first opening PHP tag (do not edit the actual file info!) to add the following:
all over the world. Join today error_reporting Avoid wrong email adresses and log these to dblog This Cookbook shows, how you can avoid to import a
Drupal White Screen On Admin Pages
user in case of errors in the e-mail address and then to
Drupal White Screen Of Death After Migration
add a notice in the drupal error-log (dblog). It adds this behavior to the module A Wusel Migration (http://drupal.org/node/1285276). php blank page no error Read more about Avoid wrong email adresses and log these to dblog Log in or register to post comments ⋅ Categories: Drupal 7.x, Contributors, Programmers, Site administrators, migrate, import, profile2, user, https://www.drupal.org/node/158043 CSV_file, error_reporting, dblog, No known problems Prevent the display of PHP's strict warnings with the Disable Messages module If you're using Drupal 6 and you are on a server which is running PHP 5.4 you may see errors like: Read more about Prevent the display of PHP's strict warnings with the Disable Messages module 6 comments Log in or register to post https://www.drupal.org/taxonomy/term/40718 comments ⋅ Categories: Drupal 6.x, Drupal 6, error_reporting, php 5.4, E_STRICT Specify 403 and 404 error pages Drupal's page error messages are meant to be direct and to the point. If you want page error messages that are a little more user-friendly, Drupal allows you to customize them. Create two nodes, one for each kind of page error (403 and 404). Determine the ID number of the node you wish to redirect users to. One way to determine the node's ID number is to visit the node and look at the number after the last slash in your browser's address bar. This is your node's ID number. Now enter the paths to your nodes in the appropriate boxes on your error reporting settings page. For example, if the node ID number for 403 error codes is "83," you would type "node/83" into the "Default 403 (access denied) page" setting. Drupal 6 mysite.com/admin/settings/error-reporting Drupal 7 mysite.com/admin/config/system/site-information Because you are creating nodes, they will show up in the tracker and popular content blocks and anywhere else real nodes would be display. If this isn't acceptable, t
developing- so you know when something isn't right even when everything seems http://definitivedrupal.org/err to be working fine, and even more when things go http://drupal.stackexchange.com/questions/25652/override-default-php-settings wrong. The below code goes in settings.php (minus the opening and closing php tags; settings.php will already have opened PHP at the top of the file and you should not close PHP at the end of a document. error reporting error_reporting(-1); // Have PHP complain about absolutely everything.
$conf['error_level'] = 2; // Show all messages on your screen
ini_set('display_errors', TRUE); // These lines give you content on WSOD pages.
ini_set('display_startup_errors', TRUE);
?> Note that for the error_level configuration setting above 2 = ERROR_REPORTING_DISPLAY_ALL but that constant is not loaded yet, so we have to use the number 2. Originally inspired by and posted to Randy Fay's blog post, If you edit PHP code, please work with E_NOTICE turned on!!!. Note As noted, the configuration 'error_level' sets what level of warning and error messages are sent to the screen. As a general principle, though, how do you know what configuration variables are available for overriding in settings.php? You can see what values are presently in the variable table with debug($conf); in your code. Howe
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 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 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. –karthik Mar 16 '12 at 8:08 Yes the notices are still getting displayed. BTW, can you check your phpinfo() for the error reporting values? –Vivek Mar 16 '12 at 8:32 error_reporting 30711 hope it helps