Hi, I had zoneminder 1.21.3 working very well on Suse before. Now I migrated over to debian and can not get a single image up.
I check every single posting which had this error message
Premature end of script headers: zms
set configure to no authentication/plain. got libssl-dev. checked to make sure zms script is found by
http://ip/cgi-bin/zms?mode=jpeg&monitor ... 0&maxfps=5
all zm files are owed by apache/apache.
what else is that that stop the image from showing?
Premature end of script headers: zms on Debian
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
nothing interesting in /var/log/messages.
httpd error.log is the one that says
Premature end of script headers: zms
running zms from the command line produces
debian:/var/www/cgi-bin# ./zms mode=jpeg monitor=1 scale=100 maxfps=5
Server: ZoneMinder Video Server/1.21.3
Expires: Mon, 26 Jul 1997 05:00:00 GMT
Last-Modified: Mon, 05 Dec 2005 23:09:10 GMT
Cache-Control: no-store, no-cache, must-revalidate
Cache-Control: post-check=0, pre-check=0
Pragma: no-cache
nph-zms produces very similar messags
when changed zms to nph-zms in config, there is no response back to the browser, and no message in /var/log/apache2/error.log.
I have verified that the web server is finding the zms and nph-zms scripts.
I changed the video format to mpeg, now I get a black screen for streaming, a blank for still. it says 2.67 fps at the bottom. (what sets the fps?)
on the index page, both Function and Source entries are orange. zmc is running.
again, xawtv works off the same video input just fine.
what else can I check?
httpd error.log is the one that says
Premature end of script headers: zms
running zms from the command line produces
debian:/var/www/cgi-bin# ./zms mode=jpeg monitor=1 scale=100 maxfps=5
Server: ZoneMinder Video Server/1.21.3
Expires: Mon, 26 Jul 1997 05:00:00 GMT
Last-Modified: Mon, 05 Dec 2005 23:09:10 GMT
Cache-Control: no-store, no-cache, must-revalidate
Cache-Control: post-check=0, pre-check=0
Pragma: no-cache
nph-zms produces very similar messags
when changed zms to nph-zms in config, there is no response back to the browser, and no message in /var/log/apache2/error.log.
I have verified that the web server is finding the zms and nph-zms scripts.
I changed the video format to mpeg, now I get a black screen for streaming, a blank for still. it says 2.67 fps at the bottom. (what sets the fps?)
on the index page, both Function and Source entries are orange. zmc is running.
again, xawtv works off the same video input just fine.
what else can I check?
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
I thought I did that.
I did export QUERY_STRING='....'
and zms produced
debian:/usr/lib/cgi-bin$ ./zms
Server: ZoneMinder Video Server/1.21.3
Expires: Mon, 26 Jul 1997 05:00:00 GMT
Last-Modified: Tue, 06 Dec 2005 22:08:25 GMT
Cache-Control: no-store, no-cache, must-revalidate
Cache-Control: post-check=0, pre-check=0
Pragma: no-cache
it looks ok to me. any ideas from this?
I did export QUERY_STRING='....'
and zms produced
debian:/usr/lib/cgi-bin$ ./zms
Server: ZoneMinder Video Server/1.21.3
Expires: Mon, 26 Jul 1997 05:00:00 GMT
Last-Modified: Tue, 06 Dec 2005 22:08:25 GMT
Cache-Control: no-store, no-cache, must-revalidate
Cache-Control: post-check=0, pre-check=0
Pragma: no-cache
it looks ok to me. any ideas from this?
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
Oops. missed that sorry. Did it return to the command line after just those headers? If so then that is wrong, you should see a continuous stream. I also assume you did something like
rather than using spaces as in your example. If you are using authentication then you will need to include parameters to pass that such as auth-xxx, or username=yyy and password=zzz
Phil
Code: Select all
export QUERY_STRING='mode=jpeg&monitor=1&scale=100&maxfps=5
Phil
to be exact, I did
export QUERY_STRING='mode=single&monitor=1&scale=100'
both ./nph-zms and ./zms produce a continuous stream, and then get stuck. which differs from what it did before. however, I still get a blank for still.
I also tested 'mode=mpeg&monitor=1&scale=100&bitrate=25000&maxfps=5&format=asf'.
I get a continuous stream in this case. so it looks like it should be working. but my screen is totally black.
I am testing in no authentication to make things easier.
so now what can I do?
export QUERY_STRING='mode=single&monitor=1&scale=100'
both ./nph-zms and ./zms produce a continuous stream, and then get stuck. which differs from what it did before. however, I still get a blank for still.
I also tested 'mode=mpeg&monitor=1&scale=100&bitrate=25000&maxfps=5&format=asf'.
I get a continuous stream in this case. so it looks like it should be working. but my screen is totally black.
I am testing in no authentication to make things easier.
so now what can I do?
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
The premature end of script headers usually implies that something is crashing or not starting which would appear not to be the case for you. However you mention that zms gets stuck, I assume you mean it just stops producing output? If so after how long? Presumably you are redirecting output to a file and it's not just that your terminal is barfing after eating control chars?
As it's a new distro to you, are you sure you have apache set up for cgi correctly?
Phil
As it's a new distro to you, are you sure you have apache set up for cgi correctly?
Phil
right, when redirected into a file, zms for single mode does not get stuck. the file contains the headers and a long trail of binaries. zms for mpeg mode writes into the file continuously until stopped manually. so everything looks good there.
I tried setting the cgi-bin directory to both /var/www/cgi-bin and /usr/lib/cgi-bin. made no difference. I tried changing file name or zms, and the webserver reports it can not find zms, so it is looking at the right place. I don't see what else can go wrong there.
as of now, I get a black streaming screen and a blank still screen. xawtv shows that channel just fine.
doesn't it look like zms is called and executed, and returns the right stuff to apache2, which is not able to read the reply? is there a module I need to load into apache for it to properly execute a c-binary as a cgi program?
does someone know if I can crop the output file and convert it to a good jpeg image for testing?
I tried setting the cgi-bin directory to both /var/www/cgi-bin and /usr/lib/cgi-bin. made no difference. I tried changing file name or zms, and the webserver reports it can not find zms, so it is looking at the right place. I don't see what else can go wrong there.
as of now, I get a black streaming screen and a blank still screen. xawtv shows that channel just fine.
doesn't it look like zms is called and executed, and returns the right stuff to apache2, which is not able to read the reply? is there a module I need to load into apache for it to properly execute a c-binary as a cgi program?
does someone know if I can crop the output file and convert it to a good jpeg image for testing?