Diagnosing and Troubleshooting Script Errors

Below are some common errors that may occur when hosting a website. If you encounter an error not covered here, we recommend contacting your site developers for assistance.
 

1. A blank page is displayed instead of website contents

You may see a blank page if an error occurs while executing scripts. By default, error output is disabled on Rucenter hosting for security reasons.

To diagnose the issue, enable error display in the PHP module settings. After enabling these settings, error messages will appear instead of a white screen, helping you identify the problem. Typical errors and debugging methods are given in the following sections of this instruction.

To enable displaying errors, enable the Error handling and logging options error_reporting and Display errors to site visitors display_errors in the PHP module settings and save the changes.

If errors are still not displayed, it means that error output is disabled in your site’s configuration files or scripts.  In this case, consult your site developers or the documentation of the CMS you are using.
 

2. Error: “Fatal error:  Call to undefined function”

This error occurs when the required PHP extensions are missing from the web server configuration. The error message indicates the missing function, which helps identify the required extension:

  • Fatal error: Call to undefined function simplexml_load_file() in ... — requires the simplexml extension;
  • Fatal error: Call to undefined function mb_detect_encoding() in ... — requires the mbstring extension;
  • Fatal error: Call to undefined function ctype_alpha() in ... — requires the ctype extension.

You can use the search function on http://www.php.net to determine which PHP extension a function belongs to if the function name doesn't clearly identify the extension.
You can enable the required extension according to the instructions for Choosing a PHP Version and Managing Extensions.
 

3. Error: “Fatal error:  Allowed memory size of XXX bytes exhausted”

This error occurs when a script exceeds the allocated memory limit. The number in bytes shown in the error message indicates the current memory limit, which is controlled by the memory_limit parameter. To resolve this, increase the Maximum Memory for Script Execution (memory_limit) parameter in the PHP settings.

If the error persists, it means the parameter is overridden in your site’s configuration files or scripts.

If the script requires more memory than the maximum memory_limit allowed by your hosting plan, this may indicate that the script is working incorrectly. In such cases, consult the script’s developers.
 

4. Error: “Headers already sent”

This error is most often caused by the presence of a BOM signature in your site’s files. First of all, check the site's configuration files that you may have made changes to.

To resolve the error, download these files to your computer, open them, and save them in UTF-8 encoding without the BOM signature. To do this, use any specialized text editor, such as Notepad++, that supports saving files in UTF-8 encoding without the BOM signature. The standard Windows Notepad is not suitable in this case.

You can also use the File Manager section of your hosting control panel to edit files. At the very beginning of the file, before the opening PHP tag, you'll see three unreadable characters. Delete them and save your changes.
In some cases, adding the following directive to your site’s .htaccess file may help:

php_value output_buffering 1


5. RAM shortage

If your site is slow, or if certain functions (such as sending mail with the mail() function) work inconsistently, check the resource usage statistics in the Resources section of the hosting control panel.

If the memory usage graph regularly reaches the RAM limit of your hosting plan, the site may experience instability or even downtime, as the server lacks resources to process incoming requests and execute scripts. Using Hosting Resources.
 

Всё ещё остались вопросы?