Website shows blank page or 500 internal server error without errors in logs

Created:

2016-12-12 03:44:08 UTC

Modified:

2017-08-08 13:44:37 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Website shows blank page or 500 internal server error without errors in logs

Applicable to:

  • Plesk 12.5 for Linux

Symptoms

Domain is not accessible: it shows an empty page. Browser console displays that domain cannot be opened with the following error:

500 internal server error

There are no any errors in /var/www/vhosts/system/example.com/logs/error_log . If the following lines are added in domain's default document (for example, index.php ) in the very beginning after <?php tag:

register_shutdown_function('sf');
function sf() {
$error = error_get_last();
var_dump($error);
}

ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
error_log('test');
echo "test";

then domain shows error similar to:

testarray(4) { ["type"]=> int(4) ["message"]=> string(28) "syntax error, unexpected ')'" ["file"]=> string(65) "/var/www/vhosts/example.com/httpdocs/wp-includes/load.php" ["line"]=> int(829) }

And the following errors may be shown in /var/www/vhosts/system/example.com/logs/error_log :

mod_fcgid: stderr: PHP Parse error:  syntax error, unexpected ')' in /var/www/vhosts/example.com/httpdocs/wp-includes/load.php on line 829
mod_fcgid: stderr: PHP Fatal error: Uncaught Error: Call to a member function getLogger() on null in /var/www/vhosts/example.com/logs/httpdocs/index.php:57
mod_fcgid: stderr: PHP Parse error: syntax error, unexpected ''' (T_ENCAPSED_AND_WHITESPACE), expecting ')' in /var/www/vhosts/example.com/logs/httpdocs/config/config.php on line 26

Cause

Syntax error or typo in a PHP file. There are no errors in /var/www/vhosts/system/example.com/logs/error_log as php error reporting is disabled in a website code.

Resolution

Contact website developer to fix the site code.

Have more questions? Submit a request
Please sign in to leave a comment.