Answers.Body: <p>Another option of seeing the civi logs is adding the extension <a href="https://civicrm.org/extensions/civicrm-log-viewer" rel="nofollow noreferrer">CiviCRM Log Viewer</a> which gives a link via the Admin menu to view the error log</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-06-18T21:24:03.507Z
Answers.Text: 500 errors usually don't show up in civi logs. The other question about civi log location might be a better place to add this? https://civicrm.stackexchange.com/questions/15931/where-are-the-configandlog-and-templates-c-directories?noredirect=1&lq=1
Answers.UserDisplayName: Demerit
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-06-19T01:06:25.023Z
Answers.Text: both v good points. thx
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-06-18T20:10:38.600Z
Answers.LastActivityDate: 2020-06-18T20:10:38.600Z
Answers.UserDisplayName: petednz - fuzion
Answers.Body: <p>A white screen (WSoD or "white screen of death") indicates that PHP is configured not to display errors, and has hit an error which it can't recover from. The result is an empty page. </p>
  
  <p>Your next step is not to fix the error, but to first give yourself enough information to identify the source of the error. (Diagnose, then treat.)</p>
  
  <p><strong>Viewing errors in logfiles</strong></p>
  
  <p>The webserver can be configured to display errors to screen, but it also logs errors to files on disk. These files vary depending on your hosting environment, so you might consult your webhost's documentation to locate them. You might look for errors in some of these locations depending on webserver/php config -</p>
  
  <pre><code>/var/log/nginx/*err*log       # NginX webserver error logs
  /var/log/apache2/*err*log     # Apache webserver &amp; mod_php error logs
  /var/log/*php*log             # PHP-FPM &amp; PHP-CGI error logs
  /var/log/php5/*log            # PHP-FPM &amp; PHP-CGI error logs
  /path/to/site/err*log         # Some hosting environments
  </code></pre>
  
  <p>And a <strong>CiviCRM specific debug log</strong> file - location varies depending on hosting environment <em>and</em> CMS, refer to <a href="https://wiki.civicrm.org/confluence/display/CRMDOC/Debugging+for+developers#Debuggingfordevelopers-Logfiles" rel="nofollow noreferrer">this wiki page</a> for location -</p>
  
  <pre><code>path/to/site/path/to/civicrm/files/ConfigAndLog/CiviCRM*log
  </code></pre>
  
  <p><em>(The <code>*</code>s above represent a wildcard, not an actual filename. Eg the last entry might be public_html/error_log on Bluehost.)</em></p>
  
  <p>Once you've located these files, you can download them to view, or you can use tools like <code>tail</code> or <code>less +F</code> to follow the files. I prefer to follow logfiles because you can watch the error appear each time.</p>
  
  <p><strong>Displaying errors to screen</strong></p>
  
  <p>You may prefer to display errors to screen. This is probably disabled on your site because it's a security risk to some degree - an attacker can see more information when errors are visible, so the default configuration is often to restrict visibility to people with server access (via the logfiles above).</p>
  
  <p>To enable error display, either:</p>
  
  <p><strong>Configure your PHP to display errors for your site</strong> via <code>php.ini</code> / <code>.htaccess</code> (see <a href="https://stackoverflow.com/questions/1053424/how-do-i-get-php-errors-to-display">How can I get PHP errors to display</a>), OR </p>
  
  <p><strong>Add PHP code to enable error display</strong> (you can add it in <code>civicrm.settings.php</code> or the top of the <code>index.php</code> of your host CMS).</p>
  
  <pre><code>&lt;?php
    error_reporting(E_ALL);
    ini_set('display_errors', TRUE);
    ini_set('display_startup_errors', TRUE);
  </code></pre>
  
  <p><strong>Making sense of what you see</strong></p>
  
  <p>Once you've taken one of the above approaches, try reproducing the actions which led to a white screen. If all's gone well, you should see an error now (on screen, or in your terminal / SSH session).</p>
  
  <p>This is where you can start debugging meaningfully. There's a good chance you're exhausting server resources (timeouts, memory exhaustion) or hitting some coding error, but once you have the relevant error message at hand you'll be much better equipped to track down the source of the problem affecting your site.</p>
  
  <p><strong>Further reading</strong></p>
  
  <ul>
  <li><a href="https://docs.civicrm.org/dev/en/latest/tools/debugging/" rel="nofollow noreferrer">Debugging on docs.civicrm.org/dev</a> is probably a better source than this answer now</li>
  <li><a href="https://stackoverflow.com/questions/1053424/how-do-i-get-php-errors-to-display">Stack Overflow: How do I get PHP errors to display?</a></li>
  <li><a href="https://civicrm.stackexchange.com/questions/376/where-should-one-look-for-logs-when-debugging-a-new-problem">Where should one look for logs when debugging a new problem?</a></li>
  <li><a href="https://www.drupal.org/node/158043" rel="nofollow noreferrer">Drupal.org: Blank pages or White Screen of Death</a></li>
  <li><a href="https://joomla.stackexchange.com/questions/299/what-is-an-efficient-way-to-troubleshoot-a-white-screen-of-death">Joomla SE: What is an efficient way to troubleshoot a White Screen of Death</a></li>
  <li><a href="https://wiki.civicrm.org/confluence/display/CRMDOC/Debugging+for+developers#Debuggingfordevelopers-Logfiles" rel="nofollow noreferrer">CiviCRM wiki: Debugging for developers</a></li>
  </ul>
  
  <p><strong>Notes</strong></p>
  
  <p>If this is the first time you've looked, there may be other errors visible which don't relate to the problem at hand. You may still need to discern what the actual problem is ...</p>
  
  <p>If you're not familiar with UNIX, this may seem like a lot of effort. It's a lot less effort than <em>guessing</em> your way through a problem though!</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-11-02T10:34:36.173Z
Answers.Text: A life saver for me! Many thanks.  Can the lines I put in civicrm settings stay there? These lines, I mean: error_reporting(E_ALL);
    ini_set('display_errors', TRUE);
    ini_set('display_startup_errors', TRUE);
Answers.UserDisplayName: Andy Clark
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-11-16T17:33:11.623Z
Answers.Text: @Andy Clark that's helpful for you to debug but it's not recommended for production as it shares error "noise" with your customers and potentially too much information with an attacker. I'd recommend leaving those settings enabled only on a development server, see *Displaying errors to screen* above.
Answers.UserDisplayName: Chris Burgess
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-11-16T17:45:07.543Z
Answers.Text: Thanks, Chris, I took those lines out
Answers.UserDisplayName: Andy Clark
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-09-14T03:12:17.780Z
Answers.Text: **Feel free to edit this answer to improve it.** I posted this originally on http://civicrm.stackexchange.com/questions/2798/joomla-backend-admin-civi-white-page-after-installation?lq=1 but have created a generic question and re-posted so we don't confuse people when referring to it there.
Answers.UserDisplayName: Chris Burgess
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2015-09-14T03:05:03.060Z
Answers.LastActivityDate: 2019-11-16T20:06:19.573Z
Answers.LastEditDate: 2019-11-16T20:06:19.573Z
Answers.UserDisplayName: Chris Burgess
Body: <p>CiviCRM is showing a blank page (aka <em>white screen of death</em> or <em>WSoD</em>) when I expect to see some output.</p>
  
  <p><strong>How can I debug CiviCRM when there is no error message visible on screen?</strong></p>
  
  <p>This includes when the error message on screen simply says "Error 500" but includes no details about the nature of the problem.</p>
  
Tags: <debugging><wsod><error>
Title: How do I debug CiviCRM when I hit a blank page / white screen / fatal error?
ThreadText: # How do I debug CiviCRM when I hit a blank page / white screen / fatal error?
  
  (Asked by: username_0 on 2015-09-14)
  
  CiviCRM is showing a blank page (aka *white screen of death* or *WSoD*) when I expect to see some output.
  
  **How can I debug CiviCRM when there is no error message visible on screen?**
  
  This includes when the error message on screen simply says "Error 500" but includes no details about the nature of the problem.
  
  **Tags:** debugging, wsod, error
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_0 on 2015-09-14. Score: 20 | Accepted answer
  
  A white screen (WSoD or "white screen of death") indicates that PHP is configured not to display errors, and has hit an error which it can't recover from. The result is an empty page.
  
  Your next step is not to fix the error, but to first give yourself enough information to identify the source of the error. (Diagnose, then treat.)
  
  **Viewing errors in logfiles**
  
  The webserver can be configured to display errors to screen, but it also logs errors to files on disk. These files vary depending on your hosting environment, so you might consult your webhost's documentation to locate them. You might look for errors in some of these locations depending on webserver/php config -
  
  ```
  /var/log/nginx/*err*log       # NginX webserver error logs
  /var/log/apache2/*err*log     # Apache webserver & mod_php error logs
  /var/log/*php*log             # PHP-FPM & PHP-CGI error logs
  /var/log/php5/*log            # PHP-FPM & PHP-CGI error logs
  /path/to/site/err*log         # Some hosting environments
  
  ```
  
  And a **CiviCRM specific debug log** file - location varies depending on hosting environment *and* CMS, refer to [this wiki page](https://wiki.civicrm.org/confluence/display/CRMDOC/Debugging+for+developers#Debuggingfordevelopers-Logfiles) for location -
  
  ```
  path/to/site/path/to/civicrm/files/ConfigAndLog/CiviCRM*log
  
  ```
  
  *(The `*`s above represent a wildcard, not an actual filename. Eg the last entry might be public\_html/error\_log on Bluehost.)*
  
  Once you've located these files, you can download them to view, or you can use tools like `tail` or `less +F` to follow the files. I prefer to follow logfiles because you can watch the error appear each time.
  
  **Displaying errors to screen**
  
  You may prefer to display errors to screen. This is probably disabled on your site because it's a security risk to some degree - an attacker can see more information when errors are visible, so the default configuration is often to restrict visibility to people with server access (via the logfiles above).
  
  To enable error display, either:
  
  **Configure your PHP to display errors for your site** via `php.ini` / `.htaccess` (see [How can I get PHP errors to display](https://stackoverflow.com/questions/1053424/how-do-i-get-php-errors-to-display)), OR
  
  **Add PHP code to enable error display** (you can add it in `civicrm.settings.php` or the top of the `index.php` of your host CMS).
  
  ```
  <?php
    error_reporting(E_ALL);
    ini_set('display_errors', TRUE);
    ini_set('display_startup_errors', TRUE);
  
  ```
  
  **Making sense of what you see**
  
  Once you've taken one of the above approaches, try reproducing the actions which led to a white screen. If all's gone well, you should see an error now (on screen, or in your terminal / SSH session).
  
  This is where you can start debugging meaningfully. There's a good chance you're exhausting server resources (timeouts, memory exhaustion) or hitting some coding error, but once you have the relevant error message at hand you'll be much better equipped to track down the source of the problem affecting your site.
  
  **Further reading**
  
  * [Debugging on docs.civicrm.org/dev](https://docs.civicrm.org/dev/en/latest/tools/debugging/) is probably a better source than this answer now
  * [Stack Overflow: How do I get PHP errors to display?](https://stackoverflow.com/questions/1053424/how-do-i-get-php-errors-to-display)
  * [Where should one look for logs when debugging a new problem?](https://civicrm.stackexchange.com/questions/376/where-should-one-look-for-logs-when-debugging-a-new-problem)
  * [Drupal.org: Blank pages or White Screen of Death](https://www.drupal.org/node/158043)
  * [Joomla SE: What is an efficient way to troubleshoot a White Screen of Death](https://joomla.stackexchange.com/questions/299/what-is-an-efficient-way-to-troubleshoot-a-white-screen-of-death)
  * [CiviCRM wiki: Debugging for developers](https://wiki.civicrm.org/confluence/display/CRMDOC/Debugging+for+developers#Debuggingfordevelopers-Logfiles)
  
  **Notes**
  
  If this is the first time you've looked, there may be other errors visible which don't relate to the problem at hand. You may still need to discern what the actual problem is ...
  
  If you're not familiar with UNIX, this may seem like a lot of effort. It's a lot less effort than *guessing* your way through a problem though!
  
  > **Comments:**
  > **username_0**: **Feel free to edit this answer to improve it.** I posted this originally on http://civicrm.stackexchange.com/questions/2798/joomla-backend-admin-civi-white-page-after-installation?lq=1 but have created a generic question and re-posted so we don't confuse people when referring to it there.  
  > **username_3**: A life saver for me! Many thanks.  Can the lines I put in civicrm settings stay there? These lines, I mean: error_reporting(E_ALL);   ini_set('display_errors', TRUE);   ini_set('display_startup_errors', TRUE);  
  > **username_0**: @username_3 that's helpful for you to debug but it's not recommended for production as it shares error "noise" with your customers and potentially too much information with an attacker. I'd recommend leaving those settings enabled only on a development server, see *Displaying errors to screen* above.  
  > **username_3**: Thanks, username_0, I took those lines out  
  
  ---
  
  ### Answer by username_1 on 2020-06-18. Score: 0
  
  Another option of seeing the civi logs is adding the extension [CiviCRM Log Viewer](https://civicrm.org/extensions/civicrm-log-viewer) which gives a link via the Admin menu to view the error log
  
  > **Comments:**
  > **username_2**: 500 errors usually don't show up in civi logs. The other question about civi log location might be a better place to add this? https://civicrm.stackexchange.com/questions/15931/where-are-the-configandlog-and-templates-c-directories?noredirect=1&lq=1  
  > **username_1**: both v good points. thx  
  
  ---
  
  