500 Errors With No Logs

Hi,

We are using suitecrm 8 and when we get a 500 error we never get anything in the logs. Not in suitecrm.log, not in prod log, and not in our php error log. We have our log level set to debug as well.

Even for fatal syntax errors there is no log any where.

Has anyone experienced this? Does anyone know how to get some logging out of 500 errors?

Thanks,

Bram

I think it’s possible that a 500 error leaves no trace if the PHP process crashes before writing to the logs. But this should be pretty rare.

I’d start by double-checking the settings in php.ini for the error log path. Then check that the PHP process can write in that directory.

I also advise using a very simple php file to get a trustworthy log going. Only after that, go for the big SuiteCRM app and try to debug that.

Start with this in public directory

<?php

echo phpinfo();

?>

Set correct ownerships and permissions. Then access it from the browser with https://your.domain.com/phpinfo.php

When you have that working, add an error.

<?php

echo phpinfo();

$explodeHere = new Detonator();

?>

No go in your file system and hunt for any log saying

PHP Fatal error: Uncaught Error: Class “Detonator” not found in /var/www/html/SuiteCRM-v8/public/phpinfo.php:3

This error surely will not crash the PHP process, so it has to be logged…