2023-06-30, 01:35 PM
(This post was last modified: 2026-07-24, 10:30 AM by Laird. Edited 6 times in total.
Edit Reason: Simplified and restructured; prepended a quick-n-dirty method; instructed to randomly name the phpinfo file
)
When MyBB outputs a blank, white screen, turn on the php.ini
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.
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
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
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.
display_errors setting to see the missing error messages. Either:- Add
ini_set('display_errors', '1');to the top ofinc/init.phpjust below the<?phpline, or after the comments (the quick-n-dirty approach that doesn't always work), or,
- Add
php_flag display_errors onto the.htaccessfile in your MyBB root (this also doesn't always work), or,
- 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,
- 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).
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.