jodohost error logs

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
\n"; echo " Fatal error in line $errline of file $errfile"; echo ", PHP " . PHP_VERSION . " (" . PHP_OS . ")
\n"; echo "Aborting...
\n"; exit(1); break; case E_USER_WARNING: echo "My WARNING [$errno] $errstr
\n"; echo "In line $errline of file $errfile"; break; case E_USER_NOTICE: echo "My NOTICE [$errno] $errstr
\n"; echo "In line $errline of file $errfile"; break; default: echo "Unkown error type: [$errno] $errstr
\n"; echo "In line $errline of file $errfile"; break; } } // set to the user defined error handler $old_error_handler = set_error_handler("errorHandler"); ?>