I'm working on a large (inherited) codebase in PHP, and the error
Exception thrown without a stack frame in Unknown on line 0
This can happen in destructors and exception handlers which don't have a stack frame. But since the message is so very helpful, your only option is to try to use
echo to find the bug (and maybe
ob_end_flush()). It may be that a destructor is throwing an exception, or is calling a function that throws an exception. Once you've located the buggy function, add a try...catch around the exception throwing part.
Note that if your framework uses it's own error handling, you have to turn of warnings and notices in the PHP configuration. Especially if you have something like this, since it turns warnings into exceptions.