Not Solved Debugging white screens (including empty ACP Plugins page listings)
#1
Not Solved
When MyBB outputs a blank, white screen, turn on the php.ini display_errors setting to see the missing error messages. Either:
  1. Add ini_set('display_errors', '1'); to the top of inc/init.php just below the <?php line, or after the comments (the quick-n-dirty approach that doesn't always work), or,
  2. Add php_flag display_errors on to the .htaccess file in your MyBB root (this also doesn't always work), or,
  3. Edit your php.ini settings via your web hosting control panel (e.g., cPanel) to set display_errors = On (contact your hosting provider for help if you need to), or,
  4. Directly edit your effective php.ini file to set display_errors = On (see below for how to identify that file; note that you might then need to restart your PHP process or web server).
Report the error message(s) that you then see for finer-grained debugging.

Identifying your effective php.ini file

The easiest way is to create in your MyBB root directory a randomly and obscurely (for security purposes) named PHP file, e.g. xclk93lkxl3.php, with these contents:
<?php
phpinfo();
and to then browse to that file and note in the output page the file location beside "Loaded Configuration File". That's the file you need to edit. After identifying the location of your effective php.ini file, immediately delete the xclk93lkxl3.php file from your MyBB root directory for security purposes.

Turn display_errors back off afterwards

At least, do so on a production board, for security purposes.

Checking whether it worked

Add this line to the top of inc/init.php, just below the <?php line or, if you added the ini_set line itemised first above, then below that line:
echo '<!-- display_errors = '.var_export(ini_get('display_errors'), true).' -->';
Then reload your page and check the start of its HTML in source view (typically, you can open this view by pressing ctrl+U).

Why it might not work

Aside from restrictions imposed by hosts, your change to this setting might not take effect because one of the plugins you've installed turns it back off at a later point. The Tapatalk plugin, for example, is known to do this.

ACP plugins

If the blank, white screen you're experiencing is in the ACP's plugins module, and is only partial - with only the contents pane being empty, as in this in the wild example - then this might be because you have neglected to install a plugin's dependencies. For example, the MyAlerts plugin depends on Plugins.Core and PluginLibrary, and failing to install both dependencies can result in a blank plugins module screen.

Context

Sometimes, MyBB outputs a white (blank) screen without outputting any error messages either to the log file or via email, despite having been configured to do one or the other via the error-related settings under Server and Optimization Options.

This post is intended to explain how to determine the error message behind any given white (blank) screen in those scenarios in which MyBB doesn't otherwise output it, so that further more specific help can then be provided to you.

If anybody has any feedback on this little how-to, then please share it, and I'll update this post if appropriate.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)