Thanks for the reply. I have tried your suggestion with the error_handler but again keep on getting an error. [TABLE=“class: scErrorTable, align: center, cellpadding: 0, cellspacing: 0”]
[TR]
[TD=“class: scErrorTitle, align: left”]Error[/TD]
[/TR]
[TR]
[TD=“class: scErrorMessage, align: center”]set_error_handler() expects the argument (globalErrorHandler) to be a valid callback[/TD]
[/TR]
[/TABLE]

What am I doing wrong?
Here’s what I have

set_error_handler(‘globalErrorHandler’, E_ALL ^ E_NOTICE);
//}

//function globalExceptionHandler($e) {
//log and email stuff here
//}

function globalErrorHandler($errno, $errstr, $errfile, $errline) {
switch ($errno) {
case E_NOTICE:
case E_USER_NOTICE:
$errors = “Notice”;
break;
case E_WARNING:
case E_USER_WARNING:
$errors = “Warning”;
break;
case E_ERROR:
case E_USER_ERROR:
$errors = “Fatal Error”;
break;
default:
$errors = “Unknown Error”;
break;
}

error_log(sprintf("PHP %s:  %s in %s on line %d", $errors, $errstr, $errfile, $errline));
$msg = "ERROR: [$errno] $errstr

".
"$errors on line $errline in file $errfile
";

// sendErrorEmail($msg);
// showErrorPage();

exit(1);

}

Test this in the commandline:
<?php
$errors=’’;
$errfile=’’;
$errline=’’;
$errstr=’’;
$errno=’’;

function globalErrorHandler($errno, $errstr, $errfile, $errline) {
switch ($errno) {
case E_NOTICE:
case E_USER_NOTICE:
$errors = “Notice”;
break;
case E_WARNING:
case E_USER_WARNING:
$errors = “Warning”;
break;
case E_ERROR:
case E_USER_ERROR:
$errors = “Fatal Error”;
break;
default:
$errors = “Unknown Error”;
break;
}
echo ‘GlobalHandler error=’.$errors;
}

error_log(sprintf(“PHP %s: %s in %s on line %d”, $errors, $errstr, $errfile, $errline));
$msg = "ERROR: [$errno] $errstr
".
"$errors on line $errline in file $errfile
";

// sendErrorEmail($msg);
// showErrorPage();

set_error_handler(‘globalErrorHandler’, E_ALL ^ E_NOTICE);
//}

//function globalExceptionHandler($e) {
//log and email stuff here
//}
echo ‘testing an error’;
echo 1/0;

exit(1);

?>

It should make it clear enough…