How do I catch a PHP fatal (`E_ERROR`) error?

Log fatal errors using the register_shutdown_function, which requires PHP 5.2+: register_shutdown_function( “fatal_handler” ); function fatal_handler() { $errfile = “unknown file”; $errstr = “shutdown”; $errno = E_CORE_ERROR; $errline = 0; $error = error_get_last(); if($error !== NULL) { $errno = $error[“type”]; $errfile = $error[“file”]; $errline = $error[“line”]; $errstr = $error[“message”]; error_mail(format_error( $errno, $errstr, $errfile, $errline)); } } … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)