No Images in Browser but everything else works

Forum for questions and support relating to the 1.25.x releases only.
Post Reply
lyallp
Posts: 49
Joined: Fri Nov 26, 2010 2:36 am
Location: Adelaide, Australia

No Images in Browser but everything else works

Post by lyallp » Tue Jan 01, 2013 7:00 am

Running 1.25.0 on Gentoo amd64 using the zugaina www-misc/zoneminder ebuild plus a couple of patches to make it compile and not generate PHP standards warnings, mentioned in this post
My webcam works, I can watch it using vlc.
I have a simple region setup, and the motion detect alarms and everything operate, events fire, images are stored, event counts go up.

I can peruse the images in the zoneminder image store.

But, I can't see any images in my browser or watch the webcam using zoneminder web interface.

I have tried right clicking on a non-showing image and simply browsing to that url and nothing comes back, BUT, if I stop zoneminder, the image will show up, whilst zoneminder is closing down.

I notice that zms seems to be looked for at http://localhost/cgi-bin/nph-zms whereas I have the rest of zoneminder installed in http://localhost/zoneminder/index.php, however, I have an Apache alias directive to deal with this, as follows :-

Code: Select all

Alias /cgi-bin/zms		"/var/www/localhost/htdocs/zoneminder/cgi-bin/zms"
Alias /cgi-bin/nph-zms	        "/var/www/localhost/htdocs/zoneminder/cgi-bin/nph-zms"

<Directory "/var/www/localhost/htdocs/zoneminder/cgi-bin">
  AllowOverride All
  Options ExecCGI
  Order allow,deny
  Allow from all
</Directory> 

Alias /zoneminder "/var/www/localhost/htdocs/zoneminder"

<Directory "/var/www/localhost/htdocs/zoneminder">
  Options -Indexes MultiViews FollowSymLinks
  AllowOverride All
  Order allow,deny
  Allow from all
</Directory> 
I even tried copying nph-zms and zms into /var/www/localhost/cgi-bin, which was the apache default location.

Any suggestions?
...Lyall

Flasheart
Posts: 345
Joined: Thu Jul 06, 2006 2:27 pm

Re: No Images in Browser but everything else works

Post by Flasheart » Wed Jan 02, 2013 6:52 am

The usual reason is as you've guessed, apache is looking in the wrong place. Often because the build didn't include the right option.

The usual answer is to verify this by checking apache's error_log to see where it's looking for, and using "ln -s" to link the actual dir to the expected dir.

There could also be permission problems, again, apache' logs should help.

lyallp
Posts: 49
Joined: Fri Nov 26, 2010 2:36 am
Location: Adelaide, Australia

Re: No Images in Browser but everything else works

Post by lyallp » Wed Jan 02, 2013 11:31 am

I appreciate any assistance!

Problem is, I can view individual frames from an event but when I attempt to watch the event, as an animated stream, I see nothing.

However, I can see nph-zms running using 'ps -fae | grep zm'

Code: Select all

apache    4530  4027  0 21:36 ?        00:00:00 /var/www/localhost/cgi-bin/nph-zms
And an example of who owns the process

Code: Select all

apache    4027  4025  0 21:33 ?        00:00:00 /usr/sbin/apache2 -D DEFAULT_VHOST -D INFO -D MANUAL -D SSL -D SSL_DEFAULT_VHOST -D
apache    4245  4027  0 21:34 ?        00:00:00 /var/www/localhost/cgi-bin/nph-zms
apache    4530  4027  0 21:36 ?        00:00:00 /var/www/localhost/cgi-bin/nph-zms
I did notice that once I stopped Zoneminder, these two processes hung around and once I killed them off, the following lines appeared in the apache log files.

Code: Select all

127.0.0.1 - - [02/Jan/2013:21:36:48 +1030] "GET /cgi-bin/nph-zms?source=event&mode=jpeg&event=11&frame=1&scale=100&rate=100&maxfps=15&replay=single&connkey=325915&rand=1357124808 HTTP/1.1" 200 -
127.0.0.1 - - [02/Jan/2013:21:34:08 +1030] "GET /cgi-bin/nph-zms?source=event&mode=jpeg&event=11&frame=1&scale=100&rate=100&maxfps=15&replay=single&connkey=81644&rand=1357124648 HTTP/1.1" 200 -
::
Nothing in the error log other than apache mod_ssl resuming normal operations (I am not using ssl for zoneminder).

Nothing in the zoneminder logs (database) indicates any exceptions.

Global read/execute permissions on zms and nph-zms in /var/www/localhost/cgi-bin (which is scriptaliased in the apache config) as well as /var/www/localhost/zoneminder/cgi-bin (which is aliased in the zoneminder part of the apache config and has ExecCGI enabled)

/etc/zm.conf is owned by apache:root and is rw to Owner and r to group, so if the zms programs access the config, they should be able to.

I am kind of confused why apache is running the /var/www/localhost/cgi-bin/nph-zms runner than the /var/www/localhost/htdocs/zonemaster/cgi-bin/nph-zms program.

Apache global config

Code: Select all

<IfModule alias_module>
	ScriptAlias /cgi-bin/ "/var/www/localhost/cgi-bin/"
</IfModule>
Zonemaster specific config

Code: Select all

Alias /cgi-bin/zms		  "/var/www/localhost/htdocs/zoneminder/cgi-bin/zms"
Alias /cgi-bin/nph-zms	  "/var/www/localhost/htdocs/zoneminder/cgi-bin/nph-zms"

<Directory "/var/www/localhost/htdocs/zoneminder/cgi-bin">
  AllowOverride All
  Options ExecCGI
  Order allow,deny
  Allow from all
</Directory> 

Alias /zoneminder "/var/www/localhost/htdocs/zoneminder"

<Directory "/var/www/localhost/htdocs/zoneminder">
  Options -Indexes MultiViews FollowSymLinks
  AllowOverride All
  Order allow,deny
  Allow from all
</Directory> 
Directory structure

Code: Select all

root@lyalls-pc /var/www/localhost 
# find . -type d # superflous directories removed from listing.
.
./cgi-bin  # copies of zms and nph-zms are in here as well
./htdocs
./htdocs/zoneminder
./htdocs/zoneminder/htdocs
./htdocs/zoneminder/htdocs/sound
./htdocs/zoneminder/htdocs/images
./htdocs/zoneminder/htdocs/events
./htdocs/zoneminder/temp
./htdocs/zoneminder/sounds
./htdocs/zoneminder/images
./htdocs/zoneminder/events      # Events have been captured, as can be seen in this directory tree
./htdocs/zoneminder/events/1
./htdocs/zoneminder/events/1/13
./htdocs/zoneminder/events/1/13/01
./htdocs/zoneminder/events/1/13/01/01
./htdocs/zoneminder/events/1/13/01/01/15
./htdocs/zoneminder/events/1/13/01/01/15/16
./htdocs/zoneminder/events/1/13/01/01/15/16/27
./htdocs/zoneminder/events/1/13/01/01/15/59
./htdocs/zoneminder/events/1/13/01/01/15/59/40
./htdocs/zoneminder/events/1/13/01/01/16
./htdocs/zoneminder/events/1/13/01/01/16/42
./htdocs/zoneminder/events/1/13/01/01/16/42/47
./htdocs/zoneminder/events/1/13/01/01/17
./htdocs/zoneminder/events/1/13/01/01/17/14
./htdocs/zoneminder/events/1/13/01/01/17/14/47
./htdocs/zoneminder/events/1/13/01/01/17/31
./htdocs/zoneminder/events/1/13/01/01/17/31/29
./htdocs/zoneminder/events/1/13/01/01/17/37
./htdocs/zoneminder/events/1/13/01/01/17/37/25
./htdocs/zoneminder/events/1/13/01/02
./htdocs/zoneminder/events/1/13/01/02/21
./htdocs/zoneminder/events/1/13/01/02/21/33
./htdocs/zoneminder/events/1/13/01/02/21/33/53
./htdocs/zoneminder/events/1/13/01/02/21/37
./htdocs/zoneminder/events/1/13/01/02/21/37/40
./htdocs/zoneminder/views
./htdocs/zoneminder/tools
./htdocs/zoneminder/tools/mootools
./htdocs/zoneminder/skins
./htdocs/zoneminder/skins/xml
./htdocs/zoneminder/skins/xml/views
./htdocs/zoneminder/skins/xml/includes
./htdocs/zoneminder/skins/mobile
./htdocs/zoneminder/skins/mobile/views
./htdocs/zoneminder/skins/mobile/views/css
./htdocs/zoneminder/skins/mobile/includes
./htdocs/zoneminder/skins/mobile/css
./htdocs/zoneminder/skins/classic
./htdocs/zoneminder/skins/classic/views
./htdocs/zoneminder/skins/classic/views/js
./htdocs/zoneminder/skins/classic/views/css
./htdocs/zoneminder/skins/classic/js
./htdocs/zoneminder/skins/classic/includes
./htdocs/zoneminder/skins/classic/graphics
./htdocs/zoneminder/skins/classic/css
./htdocs/zoneminder/lang
./htdocs/zoneminder/js
./htdocs/zoneminder/includes
./htdocs/zoneminder/graphics
./htdocs/zoneminder/css
./htdocs/zoneminder/ajax
./htdocs/zoneminder/cgi-bin   # zms and nph-zms in here too!
./error
./icons
...Lyall

lyallp
Posts: 49
Joined: Fri Nov 26, 2010 2:36 am
Location: Adelaide, Australia

Re: No Images in Browser but everything else works

Post by lyallp » Sun Jan 06, 2013 1:13 am

No further comments?

I have noticed that nph-zms seems to get stuck, each time I try stream an event, a new instance is created and they hang around forever, until I kill them.
...Lyall

lucx
Posts: 5
Joined: Sat Jan 12, 2013 4:54 pm

Re: No Images in Browser but everything else works

Post by lucx » Sat Jan 12, 2013 5:16 pm

Hello,

It took me a whail to make it to work, I have almost the same configuration as you. This is my apache vhost config

Code: Select all

<VirtualHost *:80>
    ServerAdmin webmaster@nunti-adevarate.ro
    DocumentRoot "/var/www/zoneminder/htdocs"
    ServerName zm.realfield.ro
    ServerAlias  zm.realfield.ro
    ScriptAlias /cgi-bin/zms "/var/www/zoneminder/cgi-bin/zms"
    ScriptAlias /cgi-bin/nph-zms "/var/www/zoneminder/cgi-bin/nph-zms"
  <Directory "/var/www/zoneminder/cgi-bin">
    AllowOverride All
    Options ExecCGI
    Require all granted
  </Directory>
  <Directory "/var/www/zoneminder/htdocs">
    Options -Indexes +MultiViews +FollowSymLinks
    AllowOverride All
    Require all granted
  </Directory>
     ErrorLog "/var/log/www/zm.realfield.ro_error_log"
     CustomLog "/var/log/www/zm.realfield.ro_access_log" common
</VirtualHost>
You alsow need cambozola to make it work on event view and copy or install zoneminder in /var/www not /var/www/localhost !

lyallp
Posts: 49
Joined: Fri Nov 26, 2010 2:36 am
Location: Adelaide, Australia

Re: No Images in Browser but everything else works

Post by lyallp » Sun Jan 13, 2013 3:48 am

I found that images would display using IE9 in a Windows 7 VM.

It wouild only stream 1 frame every 6 seconds, however, even though I have the UI bandwdth set to high.

Code: Select all

192.168.1.35 - - [13/Jan/2013:14:15:48 +1030] "GET /cgi-bin/nph-zms?mode=single&monitor=1&scale=100&rand=1358048601&1358048748633 HTTP/1.1" 200 -
192.168.1.35 - - [13/Jan/2013:14:15:49 +1030] "POST /zoneminder/index.php HTTP/1.1" 200 59
192.168.1.35 - - [13/Jan/2013:14:15:49 +1030] "POST /zoneminder/index.php HTTP/1.1" 200 59
192.168.1.35 - - [13/Jan/2013:14:15:50 +1030] "POST /zoneminder/index.php HTTP/1.1" 200 59
192.168.1.35 - - [13/Jan/2013:14:15:51 +1030] "POST /zoneminder/index.php HTTP/1.1" 200 59
192.168.1.35 - - [13/Jan/2013:14:15:52 +1030] "POST /zoneminder/index.php HTTP/1.1" 200 59
192.168.1.35 - - [13/Jan/2013:14:15:53 +1030] "POST /zoneminder/index.php HTTP/1.1" 200 59
192.168.1.35 - - [13/Jan/2013:14:15:54 +1030] "POST /zoneminder/index.php HTTP/1.1" 200 59
192.168.1.35 - - [13/Jan/2013:14:15:54 +1030] "POST /zoneminder/index.php HTTP/1.1" 200 27
192.168.1.35 - - [13/Jan/2013:14:15:54 +1030] "GET /cgi-bin/nph-zms?mode=single&monitor=1&scale=100&rand=1358048601&1358048754794 HTTP/1.1" 200 -
However, it does not display images using Firefox 10 nor Konqueror 4.9.3

I tried enabling cambozola, to no effect, Looking at the streaming web page source, it does not reference to cambozola, even though it is enabled in options and the jar is in the root directory of the zoneminder web app.

I found the location of the zms and nph-zms in the MySQL config database, got that bit sorted. Simply prefirxed zms and nph-zms with the appropriate web path, then updated my apache config to ScriptAlias the 'correct' path.

I see thumbnails, I see event frames, I just don't see streaming. I can see nph-zms starting, from the correct location now, but I simply see an empty picture frame with no content. Even with cambozola enabled and located in the zoneminder web directory and with the config of cambozola prefixed with an appropriate web path.

Investigation continues...
Last edited by lyallp on Mon Jan 14, 2013 7:59 am, edited 1 time in total.
...Lyall

lucx
Posts: 5
Joined: Sat Jan 12, 2013 4:54 pm

Re: No Images in Browser but everything else works

Post by lucx » Sun Jan 13, 2013 4:38 pm

Hello,

glad to hear that you got it working!!, how about controls in event view! do they work for you?? pause, play, fast forward ...??

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests