[mythtv-users] Division by zero error in MythWeb video section

Johnny jarpublic at gmail.com
Tue Jul 21 16:34:15 UTC 2009

> apache is the web server.  It can be configured to log, to various
> levels and types, all web accesses.
> What you are seeing here is that apache found the file and served it
> up to the app (mythweb), so the problem isn't path related.  I think
> this also means there aren't any permissions problems.   A path or
> permission problem would likely be reflected in the error.log, and
> look something like this:
> [Tue Jul 21 11:25:33 2009] [error] [client] File does not
> exist: /var/www/mythweb/data/video_covers/filename.jpg
> I'm thinking that it looks a problem with mythweb or how it is
> configured.  Perhaps someone else has some ideas...

OK that is good to know that it doesn't seem to be a path or
permissions problem. Also I thought it maybe some database problem but
if it is getting the file name from the database properly then that
isn't likely the problem. Any suggestions on how to use a debugger or
some other way to look at some of the variables in the php. Here is
the relevent code:

 if ($this->cover_file != 'No Cover' && file_exists($this->cover_fil\
e) ) {
            $this->cover_url = 'data/video_covers/'.substr($this->cover_fil\
e, strlen(setting('VideoArtworkDir', hostname)));
            list($width, $height) = getimagesize($this->cover_file);
            $wscale = video_img_width / $width;
            $hscale = video_img_height / $height;

More information about the mythtv-users mailing list