No Images displaying when viewing Events

Support and queries relating to all previous versions of ZoneMinder
Locked
we4zonM
Posts: 56
Joined: Fri May 30, 2008 7:21 am

No Images displaying when viewing Events

Post by we4zonM »

Edit: The solution in http://www.zoneminder.com/forums/viewtopic.php?t=11682 did not solve the problem, I have added the option to follow sym links into the Apache web server configuration, and now I am able to see non-broken image icons and broken image icons when trying to view events, but I there are no images displaying, only an empty rectangle where the image should be. What have I done? Well, I changed the event storage directory, by searching the forums and the above link is one of the forum topics that I read to get this far. I think that I am almost there, but there is still something missing.

The apache error log shows: "File does not exist: /var/www/html/mnt"

Edit: I am able to view the stats for the images of the events, and am also able to view the prev and next blank image. How can I change the permissions and configuration so that I can view the images from the web browser?

Edit: I still get an Access Forbidden, Error 403 when trying to view localhost/zm even though I have a sym link to zm.php and have the FollowSymLinks in the Apache
configuration. I have to use localhost/zm.php to use the web browser.

Edit: Apache Error log:
File does not exist: /var/www/html/mnt, referer: http //localhost/zm.php?view=event&eid=3&filter[terms][0][attr]=MonitorId&filter[terms][0][op]==&filter[terms][0][val]=1&sort_field=DateTime&sort_asc=1&page=1
Edit: I tried to copy the events to the original Zoneminder directory, just to see if it would work as it used to work, and I still had broken images, so no images were displaying in the web browser, but if I click the broken image icon then a new window would pop up with the image. I want to use the new directory that I have created the sym link to, though, and I want to see the images in the web browser without broken links...the way Zoneminder works normally.
Last edited by we4zonM on Sat Jan 31, 2009 9:19 pm, edited 1 time in total.
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Re: No Images displaying when viewing Events

Post by cordel »

we4zonM wrote:As a continuation of http://www.zoneminder.com/forums/viewtopic.php?t=11682,
Then why would you create a new thread???
we4zonM
Posts: 56
Joined: Fri May 30, 2008 7:21 am

Post by we4zonM »

Because I seem to have a different issue that was not solved by the solution in that thread. I already followed what was the solution in that thread, and it did not work. Did you have a solution for me?
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

None as I am still trying to understand how your problem was related to the other thread to begin with and what I get from this thread is that you created a drive to put events and mounted at /var/www/html/mnt and likely have not set something correctly which is the difference. If you change the mount point to /var/www/html/events for the drive and put you events path to events it might work.
or your path for events should be mnt maybe, but you have created a custom problem by doing something different, the solution is very likely similar (to another thread), but the variables are different because you have created something custom.

So lets start with what you have configured for you events path?
Where is your ZM web pages installed?
and what do you get from ls -l /var/www/html/ and ls -l /var/www/html/mnt
we4zonM
Posts: 56
Joined: Fri May 30, 2008 7:21 am

broken thumbnails, images display if clicked

Post by we4zonM »

I think that I have found out what the /mnt error was, and it appears to be unrelated to the problem that I am trying to solve in this post. The /mnt error in the error_log is from the ZM_DIR_IMAGES which was set to a /mnt/<some_temp_directory> that I was trying awhile back...but the ? explained that this directory is for images not associated with events, and the problem of this post if for image thumbnails associated with events. In short, the /mnt error does not apply to this post.

The ls for the directories is a long list. The important one is the symbolic link for the "events" directory, and it shows a sym link that goes to the directory that I have more disk space to store images for the events. That part seems fine. The images store there for events, and I can display the images if I click on the broken thumbnail icon in the web browser. The broken thumbnails is the problem that I am trying to solve with this post.

I do not think that it is a problem with the browser, because I can see the images displaying fine when I click on the broken thumbnail link. I checked the "options" setting and found ZM_WEB_LIST_THUMBS, but this just adds an extra thumbnail to the events list...which is also a broken thumbnail by the way, and if I click that broken thumbnail icon then it displays the image.

In short, I am getting broken thumbnails in the event pop up window when I click a specific event to see what triggered it. These are the thumbnails that show the images captured. What can I do to get these thumbnails to display in the browser?

Edit: After searching all events, it looks like only some of the thumbnails are broken, while some display. From the event list page in the browser with ZM_WEB_LIST_THUMBS activated, some of the events have a thumbnail image showing up in the list, while others do not have a thumbnail image in the list. I started this post after only looking at some specific events, all of which had no thumbnail images at all and only had broken thumbnail image icons. Now, the question is, why do some have thumbnail images, while others do not? All of those without thumbnail images still show a full image in the browser when the broken thumbnail icon is clicked with the mouse. I rechecked the error_log and there are no additional errors that show up when trying to view the events list or when clicking on specific events that have broken thumbnail images.
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

ZM_DIR_IMAGES and ZM_DIR_EVENTS are expected to be paths from your "Web root" not your "system root" as Apache does not have permission to traverse the system root "(or at least it shouldn't as it would be one big security hole). Although I'm still trying to dig the answers I ask for out of you response so maybe I'm missing something.

If either ZM_DIR_IMAGES and ZM_DIR_EVENTS paths you have defined start with "/" then they are not appropriate as your telling Apache to access a part of the system outside of its defined web root.

So if your drive is set and mounted from fstab to /var/www/html/mnt and assuming you have not created a directory on the drive, ZM_DIR_EVENTS should be "mnt" other wise if you were to create a directory on the drive, lets say you created two directories "events" and "images" then your setting in zm should be mnt/events and mnt/images so that apache is not traversing the system but with in it's defined root.
we4zonM
Posts: 56
Joined: Fri May 30, 2008 7:21 am

Post by we4zonM »

Not sure how come I was able to see thumbnail images before on some of the events, and how come thumbnail images were broken on other events...but I stopped all zoneminder processes after changing the directories to be relative directory paths and not absolute directory paths, even though the Apache web server configuration did allow access to those paths, and restarted the Zoneminder processes. Now, I seem to see the thumbnail images as it was working with the default settings before.

The answer to this post seems to be to use relative paths for the directories for ZM_DIR_IMAGES and ZM_DIR_EVENTS. While I have not checked every event, the event list also has the thumbnail images with the ZM_WEB_LIST_THUMBS activated, so it looks like it is now working.
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

Good, glad your sorted.
Locked