I'm having an issue when debugging Magento errors. All stack traces related to errors finish with a 'Class 'Mage' not found' and it doesn't provide any other information.
PHP Fatal error: Class 'Mage' not found in ***app/code/core/Mage/Core/functions.php on line 244, referer: http://***/catalogsearch/result/?q=jeans
In addition, the error is not logged by exception.log or system.log, but by the server error log.
The problem is that there is an actual error, but it's not being logged by Magento and Apache is logging something that is not complete.
Any idea? Is it probably a problem on the PHP configuration?