![Page 1: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/1.jpg)
Error Reporting in Zend Framework 2
Zend Framework Day – Turin, Italy – 07/02/2014
![Page 2: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/2.jpg)
STEVE MARASPIN
![Page 3: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/3.jpg)
@maraspin
![Page 4: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/4.jpg)
http://www.mvlabs.it/
![Page 5: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/5.jpg)
5
http://friuli.grusp.org/
![Page 6: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/6.jpg)
WHY WORRY?
![Page 7: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/7.jpg)
WE SCREW UP
![Page 8: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/8.jpg)
WE ALL SCREW UP
![Page 9: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/9.jpg)
Application Failures
![Page 10: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/10.jpg)
Application Failures
User Mistakes
![Page 11: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/11.jpg)
![Page 12: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/12.jpg)
INCREASED SUPPORT COST
![Page 13: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/13.jpg)
ABANDONMENT
![Page 14: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/14.jpg)
THE BOTTOM LINE
![Page 15: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/15.jpg)
User Input = Mistake Source
![Page 16: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/16.jpg)
Validation Handling
![Page 17: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/17.jpg)
User Privacy Concerns
Online Privacy: A Growing Threat. - Business Week, March 20, 2000, 96. Internet Privacy in E-
Commerce:
Framework, Review, and Opportunities for Future Research - Proceedings of the 41st Hawaii
International Conference on System Sciences - 2008
• Over 40% of online shoppers are very concerned over the use of personal information
• Public opinion polls have revealed a general desire among Internet users to protect their privacy
![Page 18: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/18.jpg)
Validation Handling
![Page 19: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/19.jpg)
Improved Error Message
![Page 20: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/20.jpg)
+70% CONVERSIONS
![Page 21: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/21.jpg)
21
![Page 22: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/22.jpg)
Creating A Form in ZF2 <?php namespace Application\Form; use Zend\Form\Form; class ContactForm extends Form { public function __construct() { parent::__construct(); // ... } //... }
![Page 23: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/23.jpg)
Creating A Form in ZF2 <?php namespace Application\Form; use Zend\Form\Form; class ContactForm extends Form { public function __construct() { parent::__construct(); // ... } //... }
![Page 24: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/24.jpg)
Adding Form Fields public function init() { $this->setName('contact'); $this->setAttribute('method', 'post'); […].. $this->add(array('name' => 'email', 'type' => 'text', 'options' => array( 'label' => 'Name', ), ); $this->add(array('name' => 'message', 'type' => 'textarea', 'options' => array( 'label' => 'Message', ), ); //. […].. }
![Page 25: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/25.jpg)
Adding Form Fields public function init() { $this->setName('contact'); $this->setAttribute('method', 'post'); […].. $this->add(array('name' => 'email', 'type' => 'text', 'options' => array( 'label' => 'Name', ), ); $this->add(array('name' => 'message', 'type' => 'textarea', 'options' => array( 'label' => 'Message', ), ); //. […].. }
![Page 26: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/26.jpg)
VALIDATION
![Page 27: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/27.jpg)
Form Validation: InputFilter
![Page 28: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/28.jpg)
Validation: inputFilter <?php
namespace Application\Form;
[…]
class ContactFilter extends InputFilter
{
public function __construct() {
// filters go here
}
}
![Page 29: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/29.jpg)
Validation: inputFilter <?php
namespace Application\Form;
[…]
class ContactFilter extends InputFilter
{
public function __construct() {
// filters go here
}
}
![Page 30: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/30.jpg)
Required Field Validation
$this->add(array( 'name' => 'email', 'required' => true, 'filters' => array( array( 'name' => 'StringTrim'), ), 'validators' => array( array( 'name' => 'EmailAddress', ) ) ));
![Page 31: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/31.jpg)
Required Field Validation
$this->add(array( 'name' => 'email', 'required' => true, 'filters' => array( array( 'name' => 'StringTrim'), ), 'validators' => array( array( 'name' => 'EmailAddress', ) ) ));
![Page 32: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/32.jpg)
InputFilter Usage <?php
namespace Application\Controller;
[…]
class IndexController extends AbstractActionController
{
public function contactAction()
{
$form = new Contact();
$filter = new ContactFilter();
$form->setInputFilter($filter);
return new ViewModel(array(
'form' => $form );
}
}
![Page 33: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/33.jpg)
InputFilter Usage <?php
namespace Application\Controller;
[…]
class IndexController extends AbstractActionController
{
public function contactAction()
{
$form = new Contact();
$filter = new ContactFilter();
$form->setInputFilter($filter);
return new ViewModel(array(
'form' => $form );
}
}
![Page 34: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/34.jpg)
Standard Error Message
![Page 35: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/35.jpg)
Improved Error Message
![Page 36: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/36.jpg)
Error Message Customization $this->add(array(
'name' => 'email',
'required' => true,
'filters' => array(
array('name' => 'StringTrim'),
),
'validators' => array(
array('name' =>'NotEmpty',
'options' => array(
'messages' => array(
NotEmpty::IS_EMPTY => 'We need an '.
'e-mail address to be able to get back to you'
),
),
),
array('name' => 'EmailAddress'),
)
));
![Page 37: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/37.jpg)
Error Message Customization $this->add(array(
'name' => 'email',
'required' => true,
'filters' => array(
array('name' => 'StringTrim'),
),
'validators' => array(
array('name' =>'NotEmpty',
'options' => array(
'messages' => array(
NotEmpty::IS_EMPTY => 'We need an '.
'e-mail address to be able to get back to you'
),
),
),
array('name' => 'EmailAddress'),
)
));
![Page 38: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/38.jpg)
More than we need…
![Page 39: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/39.jpg)
Check Chain $this->add(array(
'name' => 'email',
'required' => true,
'filters' => array(
array('name' => 'StringTrim'),
),
'validators' => array(
array('name' =>'NotEmpty',
'options' => array(
'messages' => array(
NotEmpty::IS_EMPTY => 'We need an '.
'e-mail address to be able to get back to you'
),
),
'break_chain_on_failure' => true,
),
array('name' => 'EmailAddress'),
) ));
![Page 40: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/40.jpg)
Ok, good…
![Page 41: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/41.jpg)
…but, what if?
![Page 42: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/42.jpg)
![Page 43: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/43.jpg)
![Page 44: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/44.jpg)
Words to Avoid
http://uxmovement.com/forms/how-to-make-your-form-error-messages-more-reassuring/
![Page 45: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/45.jpg)
A few tips: • Provide the user with a solution to the
problem • Do not use technical jargon, use
terminology that your audience understands
• Avoid uppercase text and exclamation points
45
![Page 46: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/46.jpg)
Improved message
![Page 47: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/47.jpg)
Condensing N messages into 1 $this->add(array(
'name' => 'email',
'required' => true,
'validators' => array(
array('name' =>'NotEmpty',
'options' => array(
'messages' => array(
NotEmpty::IS_EMPTY => 'We need an '.
'e-mail address to be able to get back to you'
)),
'break_chain_on_failure' => true,
),
array('name' => 'EmailAddress',
'options' => array(
'message' => 'E-Mail address does not seem to be valid.
Please make sure it contains the @ symbol
and a valid domain name.',
)));
![Page 48: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/48.jpg)
Condensing N messages into 1 $this->add(array(
'name' => 'email',
'required' => true,
'validators' => array(
array('name' =>'NotEmpty',
'options' => array(
'messages' => array(
NotEmpty::IS_EMPTY => 'We need an '.
'e-mail address to be able to get back to you'
)),
'break_chain_on_failure' => true,
),
array('name' => 'EmailAddress',
'options' => array(
'message' => 'E-Mail address does not seem to be valid.
Please make sure it contains the @ symbol
and a valid domain name.',
)));
![Page 49: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/49.jpg)
Messages VS message $this->add(array(
'name' => 'email',
'required' => true,
'validators' => array(
array('name' =>'NotEmpty',
'options' => array(
'messages' => array(
NotEmpty::IS_EMPTY => 'We need an '.
'e-mail address to be able to get back to you'
)),
'break_chain_on_failure' => true,
),
array('name' => 'EmailAddress',
'options' => array(
'message' => 'E-Mail address does not seem to be valid.
Please make sure it contains the @ symbol
and a valid domain name.',
)));
![Page 50: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/50.jpg)
Translated Error Messages
![Page 51: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/51.jpg)
Default Message Translation
public function onBootstrap(MvcEvent $e)
{
$translator = $e->getApplication()
->getServiceManager()->get('translator');
$translator->addTranslationFile(
'phpArray', __DIR__ .
'/../../vendor/zendframework/zendframework/'.
'resources/languages/it/Zend_Validate.php',
'default',
'it_IT'
);
AbstractValidator::setDefaultTranslator($translator);
}
![Page 52: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/52.jpg)
Custom Message Translation
$this->add(array(
'name' => 'email',
'required' => true,
'validators' => array(
array('name' =>'NotEmpty',
'options' => array(
'translator' => $translator,
'message' => $translator->translate(
'Make sure your e-mail address contains the @
symbol and a valid domain name.'
)),
'break_chain_on_failure' => true,
),
)));
![Page 53: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/53.jpg)
Form Factory
$translator = $I_services->get('translator');
$I_form = new Contact();
$I_filter = new ContactFilter($translator);
$I_form->setInputFilter($I_filter);
return $I_form;
![Page 54: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/54.jpg)
Translated Error Message
![Page 55: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/55.jpg)
http://patterntap.com/pattern/funny-and-helpful-404-error-page-mintcom
![Page 56: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/56.jpg)
56
![Page 57: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/57.jpg)
![Page 58: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/58.jpg)
Error Display Configuration
Skeleton Applicaton
Configuration
![Page 59: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/59.jpg)
Hiding Exception Traces 'view_manager' => array(
'display_not_found_reason' => false,
'display_exceptions' => false,
'doctype' => 'HTML5',
'not_found_template' => 'error/404',
'exception_template' => 'error/index',
'template_map' => array(
'layout/layout' => __DIR__ . '/../view/layout/layout.phtml',
'application/index/index'=> __DIR__ .
'/../view/application/index/index.phtml',
'error/404' => __DIR__ . '/../view/error/404.phtml',
'error/index' => __DIR__ . '/../view/error/index.phtml',
),
'template_path_stack' => array(
__DIR__ . '/../view',
),
),
![Page 60: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/60.jpg)
Hiding Exception Traces 'view_manager' => array(
'display_not_found_reason' => false,
'display_exceptions' => false,
'doctype' => 'HTML5',
'not_found_template' => 'error/404',
'exception_template' => 'error/index',
'template_map' => array(
'layout/layout' => __DIR__ . '/../view/layout/layout.phtml',
'application/index/index'=> __DIR__ .
'/../view/application/index/index.phtml',
'error/404' => __DIR__ . '/../view/error/404.phtml',
'error/index' => __DIR__ . '/../view/error/index.phtml',
),
'template_path_stack' => array(
__DIR__ . '/../view',
),
),
![Page 61: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/61.jpg)
![Page 62: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/62.jpg)
Custom Error Pages 'view_manager' => array(
'display_not_found_reason' => false,
'display_exceptions' => false,
'doctype' => 'HTML5',
'not_found_template' => 'error/404',
'exception_template' => 'error/index',
'template_map' => array(
'layout/layout' => __DIR__ . '/../view/layout/layout.phtml',
'application/index/index'=> __DIR__ .
'/../view/application/index/index.phtml',
'error/404' => __DIR__ . '/../view/error/404.phtml',
'error/index' => __DIR__ . '/../view/error/index.phtml',
),
'template_path_stack' => array(
__DIR__ . '/../view',
),
),
![Page 63: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/63.jpg)
![Page 64: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/64.jpg)
How about PHP Errors?
class IndexController extends AbstractActionController
{
public function indexAction()
{
1/0;
return new ViewModel();
}
}
![Page 65: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/65.jpg)
How about PHP Errors?
class IndexController extends AbstractActionController
{
public function indexAction()
{
1/0;
return new ViewModel();
}
}
![Page 66: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/66.jpg)
![Page 67: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/67.jpg)
Early error detection principle
![Page 68: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/68.jpg)
What can we do?
![Page 69: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/69.jpg)
Handling PHP Errors public function onBootstrap(MvcEvent $I_e) { […] set_error_handler(array('Application\Module','handlePhpErrors')); } public static function handlePhpErrors($i_type, $s_message, $s_file, $i_line) { if (!($i_type & error_reporting())) { return }; throw new \Exception("Error: " . $s_message . " in file " . $s_file . " at line " . $i_line); }
![Page 70: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/70.jpg)
What happens now?
class IndexController extends AbstractActionController
{
public function indexAction()
{
1/0;
return new ViewModel();
}
}
![Page 71: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/71.jpg)
![Page 72: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/72.jpg)
Now… what if? class IndexController extends AbstractActionController
{
public function indexAction()
{
$doesNotExist->doSomething();
return new ViewModel();
}
}
![Page 73: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/73.jpg)
Fatal error: Call to a member function doSomething() on a non-object in
/srv/apps/zfday/module/Application/src/Application/Controller/IndexController.php
on line 20
![Page 74: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/74.jpg)
FATAL ERRORS
![Page 75: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/75.jpg)
Fatal Error Handling public function onBootstrap(MvcEvent $I_e) { […] $am_config = $I_application->getConfig(); $am_environmentConf = $am_config['mvlabs_environment']; // Fatal Error Recovery if (array_key_exists('recover_from_fatal', $am_environmentConf) && $am_environmentConf['recover_from_fatal']) { $s_redirectUrl = $am_environmentConf['redirect_url']; } $s_callback = null; if (array_key_exists('fatal_errors_callback', $am_environmentConf)) { $s_callback = $am_environmentConf['fatal_errors_callback']; } register_shutdown_function(array('Application\Module', 'handleFatalPhpErrors'), $s_redirectUrl, $s_callback); }
![Page 76: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/76.jpg)
Fatal Error Handling /** * Redirects user to nice page after fatal has occurred */ public static function handleFatalPhpErrors($s_redirectUrl, $s_callback = null) { if (php_sapi_name() != 'cli' && @is_Array($e = @get_last())) { if (null != $s_callback) { // This is the most stuff we can get. // New context outside of framework scope $m_code = isset($e['type']) ? $e['type'] : 0; $s_msg = isset($e['message']) ? $e['message']:''; $s_file = isset($e['file']) ? $e['file'] : ''; $i_line = isset($e['line']) ? $e['line'] : ''; $s_callback($s_msg, $s_file, $i_line); } header("location: ". $s_redirectUrl); } return false; }
![Page 77: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/77.jpg)
Fatal Error Handling 'mvlabs_environment' => array(
'exceptions_from_errors' => true,
'recover_from_fatal' => true,
'fatal_errors_callback' => function($s_msg, $s_file, $s_line) {
return false;
},
'redirect_url' => '/error',
'php_settings' => array(
'error_reporting' => E_ALL,
'display_errors' => 'Off',
'display_startup_errors' => 'Off',
),
),
![Page 78: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/78.jpg)
PHP Settings Conf 'mvlabs_environment' => array(
'exceptions_from_errors' => true,
'recover_from_fatal' => true,
'fatal_errors_callback' => function($s_msg, $s_file, $s_line) {
return false;
},
'redirect_url' => '/error',
'php_settings' => array(
'error_reporting' => E_ALL,
'display_errors' => 'Off',
'display_startup_errors' => 'Off',
),
),
![Page 79: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/79.jpg)
PHP Settings public function onBootstrap(MvcEvent $I_e) { […] foreach($am_phpSettings as $key => $value) { ini_set($key, $value); } }
![Page 80: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/80.jpg)
NICE PAGE!
![Page 81: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/81.jpg)
CUSTOMER SUPPORT TEAM REACTION http://www.flickr.com/photos/18548283@N00/8030280738
![Page 82: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/82.jpg)
![Page 83: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/83.jpg)
ENVIRONMENT DEPENDANT CONFIGURATION
![Page 84: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/84.jpg)
During Deployment
![Page 85: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/85.jpg)
Local/Global Configuration Files
![Page 86: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/86.jpg)
During Deployment
Runtime
![Page 87: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/87.jpg)
Index.php // Application wide configuration $am_conf = $am_originalConf = require 'config/application.config.php'; // Environment specific configuration $s_environmentConfFile = 'config/application.'.$s_env.'.config.php'; if (file_exists($s_environmentConfFile) && is_readable($s_environmentConfFile)) { // Specific environment configuration merge $am_environmentConf = require $s_environmentConfFile; $am_conf = Zend\Stdlib\ArrayUtils::merge($am_originalConf, $am_environmentConf ); } // Additional Specific configuration files are also taken into account $am_conf["module_listener_options"]["config_glob_paths"][] = 'config/autoload/{,*.}' . $s_env . '.php'; Zend\Mvc\Application::init($am_conf)->run();
![Page 88: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/88.jpg)
application.config.php
'modules' => array(
'Application',
),
![Page 89: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/89.jpg)
Application.dev.config.php
'modules' => array(
'Application',
'ZendDeveloperTools',
),
![Page 90: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/90.jpg)
Enabling Environment Confs // Application nominal environment $am_conf = $am_originalConf = require 'config/application.config.php'; // Environment specific configuration $s_environmentConfFile = 'config/application.'.$s_env.'.config.php'; // Do we have a specific configuration file? if (file_exists($s_environmentConfFile) && is_readable($s_environmentConfFile)) { // Specific environment configuration merge $am_environmentConf = require $s_environmentConfFile; $am_conf = Zend\Stdlib\ArrayUtils::merge($am_originalConf, $am_environmentConf ); } // Additional Specific configuration files are also taken into account $am_conf["module_listener_options"]["config_glob_paths"][] = 'config/autoload/{,*.}' . $s_env . '.php'; Zend\Mvc\Application::init($am_conf)->run();
![Page 91: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/91.jpg)
Env Dependant Conf Files
![Page 92: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/92.jpg)
index.php Check
// What environment are we in? $s_env = getenv('APPLICATION_ENV'); if (empty($s_env)) { throw new \Exception('Environment not set.'. ' Cannot continue. Too risky!'); }
![Page 93: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/93.jpg)
Apache Config File
<VirtualHost *:80>
DocumentRoot /srv/apps/zfday/public
ServerName www.dev.zfday.it
SetEnv APPLICATION_ENV "dev"
<Directory /srv/apps/zfday/public>
AllowOverride FileInfo
</Directory>
</VirtualHost>
![Page 94: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/94.jpg)
LOGGING
http://www.flickr.com/photos/otterlove/8154505388/
![Page 95: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/95.jpg)
Why Log?
• Troubleshooting • Stats Generation • Compliance
95
![Page 96: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/96.jpg)
Zend Log $logger = new Zend\Log\Logger;
$writer = new Zend\Log\Writer\Stream('/var/log/app.log');
$logger->addWriter($writer);
$logger->info('Informational message');
$logger->log(Zend\Log\Logger::EMERG, 'Emergency message');
![Page 97: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/97.jpg)
Zend Log $logger = new Zend\Log\Logger;
$writer = new Zend\Log\Writer\Stream('/var/log/app.log');
$logger->addWriter($writer);
$logger->info('Informational message');
$logger->log(Zend\Log\Logger::EMERG, 'Emergency message');
Zend\Log\Logger::registerErrorHandler($logger); Zend\Log\Logger::registerExceptionHandler($logger);
![Page 98: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/98.jpg)
Writers
98
![Page 99: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/99.jpg)
Writers
99
![Page 100: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/100.jpg)
Logrotate /var/log/app.log { missingok rotate 7 daily notifempty copytruncate compress endscript }
100
![Page 101: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/101.jpg)
Writers
101
![Page 102: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/102.jpg)
Writers
102
![Page 103: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/103.jpg)
Writers
103
![Page 104: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/104.jpg)
Zend Log Ecosystem
104
![Page 105: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/105.jpg)
Filter Example
$logger = new Zend\Log\Logger;
$writer1 = new Zend\Log\Writer\Stream('/var/log/app.log');
$logger->addWriter($writer1);
$writer2 = new Zend\Log\Writer\Stream('/var/log/err.log');
$logger->addWriter($writer2);
$filter = new Zend\Log\Filter\Priority(Logger::CRIT);
$writer2->addFilter($filter);
$logger->info('Informational message');
$logger->log(Zend\Log\Logger::CRIT, 'Emergency message');
![Page 106: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/106.jpg)
Monolog
use Monolog\Logger;
use Monolog\Handler\StreamHandler;
$log = new Logger('name');
$log->pushHandler(new StreamHandler('/var/log/app.log',
Logger::WARNING));
$log->addWarning('Foo');
$log->addError('Bar');
![Page 107: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/107.jpg)
Monolog Components
107
![Page 108: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/108.jpg)
How to log? class IndexController {
public function helloAction() {
return new ViewModel('msg' =>"Hello!");
}
}
![Page 109: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/109.jpg)
Traditional Invokation
![Page 110: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/110.jpg)
Logging Within Controller
class GreetingsController {
public function helloAction() {
$I_logger = new Logger();
$I_logger->log("We just said Hello!");
return new ViewModel('msg' =>"Hello!");
}
}
![Page 111: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/111.jpg)
Single Responsability Violation
class GreetingsController {
public function helloAction() {
$I_logger = new Logger();
$I_logger->log("We just said Hello!");
return new ViewModel('msg' =>"Hello!");
}
}
![Page 112: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/112.jpg)
Fat Controllers class GreetingsController {
public function helloAction() {
$I_logger = new Logger();
$I_logger->log("We just said Hello!");
$I_mailer = new Mailer();
$I_mailer->mail($s_msg);
$I_queue = new Queue();
$I_queue->add($s_msg);
return new ViewModel('msg' =>"Hello!");
}
}
![Page 113: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/113.jpg)
CROSS CUTTING CONCERNS
![Page 114: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/114.jpg)
What can we do?
![Page 115: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/115.jpg)
Handling Events class Module {
public function onBootstrap(MvcEvent $e) {
$eventManager = $e->getApplication()
->getEventManager();
$moduleRouteListener = new ModuleRouteListener();
$moduleRouteListener->attach($eventManager);
$logger = $sm->get('logger');
$eventManager->attach('wesaidHello',
function(MvcEvent $event) use
($logger) {
$logger->log($event->getMessage());
);
}
}
![Page 116: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/116.jpg)
Triggering An Event class GreetingsController {
public function helloAction() {
$this->eventManager
->trigger('wesaidHello',
$this,
array('greeting' => 'Hello!')
);
return new ViewModel('msg' => "Hello!");
}
}
![Page 117: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/117.jpg)
Traditional Invokation
![Page 118: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/118.jpg)
Event Manager
![Page 119: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/119.jpg)
OBSERVER
http://www.flickr.com/photos/lstcaress/502606063/
![Page 120: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/120.jpg)
Event Manager
![Page 121: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/121.jpg)
Handling Framework Errors class Module {
public function onBootstrap(MvcEvent $e) {
$eventManager = $e->getApplication()
->getEventManager();
$moduleRouteListener = new ModuleRouteListener();
$moduleRouteListener->attach($eventManager);
$logger = $sm->get('logger');
$eventManager->attach(MvcEvent::EVENT_RENDER_ERROR,
function(MvcEvent $e) use ($logger) {
$logger->info('An exception has Happened ' .
$e->getResult()->exception->getMessage());
}, -200);
);
}
}
![Page 122: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/122.jpg)
Event Manager
![Page 123: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/123.jpg)
Stuff to take home 1. When reporting errors, make sure to be
nice with users 2. Different error reporting strategies could
be useful for different environments 3. The event manager reduces coupling and
provides flexibility
123
![Page 124: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/124.jpg)
![Page 125: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/125.jpg)
![Page 126: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/126.jpg)
![Page 127: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/127.jpg)
2 min intro
![Page 128: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/128.jpg)
https://xkcd.com/208/
![Page 129: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/129.jpg)
Starting Things Up
input { stdin { } }
output { stdout { codec => rubydebug } }
![Page 130: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/130.jpg)
Starting Things Up
input { stdin { } }
output { stdout { codec => rubydebug } }
java -jar logstash-1.3.3-flatjar.jar agent -f sample.conf
![Page 131: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/131.jpg)
Integrated Elasticsearch
input {
file { path => ["/opt/logstash/example.log"] }
}
output {
stdout { codec => rubydebug }
elasticsearch { embedded => true }
}
java -jar logstash-1.3.3-flatjar.jar agent -f elastic.conf
![Page 132: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/132.jpg)
Integrated Web Interface
input {
file { path => ["/opt/logstash/example.log"] }
}
output {
stdout { codec => rubydebug }
elasticsearch { embedded => true }
}
java -jar logstash.jar agent -f elastic.conf --web
![Page 133: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/133.jpg)
Kibana
![Page 134: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/134.jpg)
Thank you for your attention
Stefano Maraspin @maraspin
![Page 135: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/135.jpg)
@maraspin
![Page 136: Error Reporting in ZF2: form messages, custom error pages, logging](https://reader033.vdocuments.net/reader033/viewer/2022051613/54c79d2b4a79595b1f8b45b7/html5/thumbnails/136.jpg)
Stefano Maraspin @maraspin