By default, PEAR modules will return errors from a function call. These errors take the form of ''PEAR_Error'' objects. The correct way to handle these is: getMessage().' '.$db->getUserInfo()); } ?> This should be done for all calls which are documented to return an error. Another way to handle errors in PEAR is to use a global error handler. A simple example is below. This will die on all ''PEAR_Error''s and show the reason for the error: getMessage().' '.print_r($e->getUserInfo(), true)); } require_once 'PEAR.php'; PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, 'handle_pear_error'); ?>