Persephone Debug PHP Failures and blank pages
Document

Debug PHP Failures and blank pages

by Group Public on Monday March 23 2009 @ 20:58:07 (1/1 Points)

Configuration ↪Reference ✑ Reply ✓ Stick It ✗ Ditch It ⚐ Tag It

If you have mysterious symptoms, such as pages being blank or incomplete, you may have an incomplete configuration.

Due to the migration to PHP5 and MDB2 still being PHP4 compatible, the errors need to be suppressed on inclusion of those pear modules. This has the unfortunate side-effect that during initial deployment you won't see valuable error messages from those modules.

We have a kind of workaround in another project by overriding the error handler, but we find that solution inelegant in this case -- too much layering of the error handling. Hopefully this problem goes away once MDB2 is somehow migrated, or an alternative is provided.

Disable Error Suppression

Most like you just need to remove the error suppression code from the dbsource.inc file. That is, these three lines:

@require_once 'MDB2.php';
@require_once 'MDB2/Date.php';
@require_once 'Date.php';

should be:

require_once 'MDB2.php';
require_once 'MDB2/Date.php';
require_once 'Date.php';

Then test your pages again. You'll get error messages now in error.log, or on the screen if you haven't disabled them. Once you have installed the necessary modules you can simply at the @ signs again.

Don't worry, this only suppresses compile/parse-time errors. Actual run-time errors from the MDB2 module are reported.

© 2008-2010 edA-qa mort-ora-y
Using Persephone and TestPlan
Tag: