How do I view the error logs for my site hosted on jodohost?
I’m finding it time cosuming figuring out which php line of code has an error every time I have a page with an error.
Thanks,
Michael
How do I view the error logs for my site hosted on jodohost?
I’m finding it time cosuming figuring out which php line of code has an error every time I have a page with an error.
Thanks,
Michael
If for some reason your page doesn’t display the error on screen in a usable way, you can always write your own error handler function that dumps it into a logfile, sends an email or whatever.
See set_error_handler() and keep in mind the ‘magical’ constants like LINE, FILE, FUNCTION and CLASS.
Thanks that worked great.
In my files I put:
require_once(“../cgi-bin/error.php”)
I modified some example code to get error.php:
<?php // set the error reporting level for this script error_reporting(E_USER_ERROR | E_USER_WARNING | E_USER_NOTICE); // error handler function function errorHandler($errno, $errstr, $errfile, $errline) { switch ($errno) { case E_USER_ERROR: echo "My ERROR [$errno] $errstr