Blank or Partially Rendered Pages

From WHMCS Documentation

Revision as of 15:31, 12 May 2017 by David (talk | contribs)

If at any time you encounter a blank or partially rendered page in your WHMCS installation, this indicates a fatal PHP error is occurring which stops the execution from being able to continue. This page covers the most common causes of these problems, how to identify them and methods for resolution.

The display of error information is disabled by default. The Error Management documentation provides in-depth information regarding the default error behaviors and optional settings of WHMCS.

Having Display Errors enabled while your installation is accessible to end users can lead to potential security risks due to the information error messages can contain. If you enable Display Errors for debugging purposes, don't forget to turn it off again!

Getting Error Information

The Error_Management documentation provides a full description of the WHMCS Error Management system and all possible options at your ready. The following sections provide an abridged description of the Display Errors option and overview on how you should consider utilizing it.

When Should You Enable Display Errors

Display Errors option will often provide additional information when you are experiencing a critical error that is resulting in on of the following:

  • Friendly "Oops!" pages
  • Entirely blank pages
  • Partially rendered pages

In most cases, you will want to use the Log Errors and SQL Debug Mode first, if possible. These options usually will capture the same information that is rendered by the Display Errors option. In the event that these options are not viable or do not yield any information, Display Errors is a good alternative.

The Display Errors option is very handy however it will show your error information to anyone who is encountering the same error condition. Showing errors to visitors or non-privileged staff should be avoided when possible.

Typical Causes

Some of the most common causes of "Oops!", partial, or empty page rendering include:

  • Missing or corrupted files / incomplete uploads
  • Server not meeting minimum system requirements
  • PHP, Apache or Ioncube related errors
  • Incompatible hooks or addons
  • Syntax errors in custom modules, hooks or templates

Enabling From The Admin Area

If the admin area is functioning enough to allow you to navigate to General Settings follow these steps to enable error display. Then retry the steps that previously led to the blank or partially rendered page and further error information should be displayed.

  1. Navigate to Setup > General Settings > Other
  2. Tick the Display Errors checkbox located towards the bottom of the page
  3. Click Save Changes

Remember to return here and uncheck Display Errors when you are finished troubleshooting. Leaving error display enabled can be a security concern.

Enabling From Your Configuration File

If the error is severe enough, you may find you are unable to login to the admin area. In those situations, there is a manual configuration file flag option that you can add to the configuration.php file in the WHMCS root directory to enable error reporting.

The lines needs to be added at the very end of the configuration.php file, right before the closing PHP tag (?>) if your configuration.php file has one, otherwise just the last line in the file.

$display_errors = true;

After adding the lines and saving/uploading the file, retry the steps that previously led to the "Oops!", blank, or partially rendered page and further error information should be displayed.

Again remember to return here and remove these lines when you are finished troubleshooting. Leaving error display enabled can be a security concern.

Further Troubleshooting Steps

Client Area Only

If the admin area is loading correctly and only the client area is blank this suggests the template folder missing or the /templates_c folder invalid path/not writeable.

To resolve this:

  • Re-select template under Setup > General Settings and clicking Save Changes.
  • Ensure the templates_c has the appropriate permissions and ownership values so it's writeable by the script (usually CHMOD 755, but in some environments CHMOD 777 may be required).
  • If the /templates_c directory has been moved to a custom location ensure the path is correct in the configuration.php file. Your server admin/hosting provider will be able to confirm this.

Admin Login Page Only

The admin login page does not involve templates, so seeing a blank page here suggests a problem with the Ioncube configuration on your server. You can download the Ioncube Loader Wizard from http://www.ioncube.com/loaders.php and upload to your whmcs directory, then visit it in your browser. Your server admin/hosting provider will need to resolve any errors it identifies.

If it reports Ioncube is installed correctly please ensure display_errors is enabled in the server's PHP configuration as this may be suppressing out error messages WHMCS is trying to output with the display_errors line in the configuration.php file detailed above.

Problematic custom widgets may also cause a blank page. Try removing any non-standard files from the /modules/widgets directory.

Blank Pages Elsewhere

If blank pages are occurring on all pages, please try all the above steps, particularly enabling display_errors. If none of the above resolves the issue review any custom files in the following locations and ensure there are no blank spaces or carriage returns outside the <?php and ?> tags:

  • /configuration.php
  • /includes/hooks/
  • /modules/admin/
  • /modules/addons/
  • /modules/registrars/
  • /modules/servers/
  • /modules/widgets/
  • /lang/
  • /lang/overrides/
  • /admin/lang/
  • /admin/lang/overrides/

It may be necessary to remove any custom files from these locations temporarily, if doing so resolves the issue then you can add them back one-by-one until the problem re-occurs, you can then contact the vendor of the offending file for a fix.

If none of the steps on this page fix the problem then please contact our support team for assistance. In your support ticket please include the attempts you have made to resolve the issue, instructions to reproduce the blank page and FTP/SFTP access.