Page 1 of 1
zms: premature end of script headers
Posted: Tue Nov 18, 2003 2:42 pm
by bowman
Hi,
I have installed zm, zms is in /opt/apache/cgi-bin/. I can´t see an image from the cam (the cam does take images though), so I tried to find out why. It appears to be a problem with /opt/apache/cgi-bin/zms which does obviously send wrong output to the browser (premature end of script headers), so that I only get the "broken image" icon :( Any ideas?
Cheers
bowman
Re: zms: premature end of script headers
Posted: Tue Nov 18, 2003 3:15 pm
by zoneminder
Hi,
Which version of ZM are you running, and on which distro, and which browser are you using to view the stream?
You should be able to run zms interactively from the command line to see if it's doing anything odd. Basically you will need to set the QUERY_STRING environment variable to something like 'monitor=1&idle=2500&refresh=100&scale=1' where the important parameter is the monitor one which should be set to a valid monitor id.
Then just type '/path/to/zms' to run it. Assuming it works you will probably get a bunch of control codes in the image bitstream so you might want to redirect the output to a file before you look at it.
Phil,
Re: zms: premature end of script headers
Posted: Wed Nov 19, 2003 12:37 am
by bowman
Hi again,
zm 0.9.15 on Debian Testing, 2.4.22 kernel, Apache 1.3.28, Browser: Mozilla Firebird 0.6.1 (Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5a) Gecko/20030728 Mozilla Firebird/0.6.1)
So in a bash shell, I did:
$ export QUERY_STRING="monitor=1&idle=2500&refresh=100&scale=1"
$ /opt/apache/cgi-bin/zms
$
this means: no output at all from the zms binary.
strace yields the following at the end:
rt_sigaction(SIGPIPE, {0x40204370, [], SA_RESTORER, 0x40159528}, {SIG_IGN}, 8) = 0
send(3, "<139>Nov 19 01:27:42 zms[722]: E"..., 84, 0) = 84
rt_sigaction(SIGPIPE, {SIG_IGN}, NULL, 8) = 0
exit_group(-1) = ?
There is an error printed out by zms, which I´ve found in syslog:
Nov 19 01:29:50 localhost zms[729]: ERR [Shared memory not initialised by capture daemon]
I suppose that the capture daemon isn´t even running, but the installation of the automated scripts didn´t work so I skipped that step ;)
Re: zms: premature end of script headers
Posted: Wed Nov 19, 2003 12:57 am
by bowman
btw, having started zmc manually (zmdc.pl start zmc -d 0), I get a new error message in syslog:
Nov 19 01:54:22 localhost zmc-d0[950] ERR [can´t shmget: permission denied]
(the error from zms staying the same as above)
looks bad. :-/
Re: zms: premature end of script headers
Posted: Fri Nov 21, 2003 12:29 pm
by dwhile
You can't stream the images until you get the capture working successfully. You need to concentrate on the zmc problem first. You appear to be running as a non root user is that correct?