otuatail Posted June 23, 2016 Share Posted June 23, 2016 (edited) Need to cancel this but can't find a button. Fatal error: Cannot redeclare myErrorHandler() (previously declared in /vhost/vhost15/d/e/s/des-otoole.co.uk/www/library/secure/SecureFunctions.php:68) in/vhost/vhost15/d/e/s/des-otoole.co.uk/www/library/secure/SecureFunctions.php on line 94 here is the function function myErrorHandler($errno, $errstr, $errfile, $errline) // ********** <- Line 68 { switch ($errno) { case E_USER_ERROR: $_SESSION['MyError'] = "Gotcha: <br>$errstr<br>$errfile<br>$errline"; mailtoX('Error', $errstr,$_SESSION['MyError']); $_SESSION[Error]= $errstr; $redirect = "Location: http://www.desmond-otoole.co.uk/myerror.php"; header($redirect); exit(0); break; case E_USER_WARNING: // echo ""; break; case E_USER_NOTICE: // echo ""; break; default: // echo ""; break; } /* Don't execute PHP internal error handler */ return true; } // ********** <- Line 94 $old_error_handler = set_error_handler("myErrorHandler"); Need to cancel this but can't find a button. Edited June 23, 2016 by otuatail Quote Link to comment https://forums.phpfreaks.com/topic/301386-cannot-redeclare-myerrorhandler/ Share on other sites More sharing options...
requinix Posted June 23, 2016 Share Posted June 23, 2016 You are executing that file twice, as in through two include()s or require()s. At least. Don't do that. Quote Link to comment https://forums.phpfreaks.com/topic/301386-cannot-redeclare-myerrorhandler/#findComment-1533972 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.