View unanswered posts | View active topics It is currently Fri Oct 31, 2014 1:41 pm



Reply to topic  [ 8 posts ] 
Authentication mode + streaming 
Author Message

Joined: Tue Mar 30, 2004 5:31 pm
Posts: 17
Post Authentication mode + streaming
Got ZM setup and working great with auth turned off, so I went to turn it on, and now streaming (and stills) is broken, for both live and recorded events. Just shows up as a broken image, and if I right click and "view image", it says 500 internal server error.

with plain auth set, I get this:

access.log:
Code:
10.10.6.2 - - [27/Jul/2005:21:51:09 -0400] "GET /security/index.php?view=watchevents&max_events=10&mid=2 HTTP/1.1" 200 10337 "http://its/security/index.php?view=watch&mid=2&control=&mode=still&scale=100" "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4"
10.10.6.2 - - [27/Jul/2005:21:51:09 -0400] "GET /cgi-bin/zms?mode=single&monitor=2&scale=100&user=admin&pass=&rand=1122515468HTTP/1.1" 500 644 "http://its/security/index.php?view=watchfeed&mode=still&mid=2&scale=100&control=" "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4"
10.10.6.2 - - [27/Jul/2005:21:51:12 -0400] "GET /cgi-bin/zms?mode=single&monitor=2&scale=100&user=admin&pass=&rand=1122515468HTTP/1.1" 500 644 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4"


error.log:
Code:
[Wed Jul 27 21:51:09 2005] [error] [client 10.10.6.2] Premature end of script headers: zms, referer: http://its/security/index.php?view=watchfeed&mode=still&mid=2&scale=100&control=
Extraneous options, 2
zmu <-d device_no> [-v] [function] [-U<username> -P<password>]
zmu <-m monitor_id> [-v] [function] [-U<username> -P<password>]
General options:
  -h, --help                     : This screen
  -v, --verbose                  : Produce more verbose output
Options for use with devices:
  -d, --device <device_no>       : Get the current video device settings for /dev/video<device_no>
  -q, --query                    : Query the current settings for the device
Options for use with monitors:
  -m, --monitor <monitor_id>     : Specify which monitor to address, default 1 if absent
  -q, --query                    : Query the current settings for the monitor
  -s, --state                    : Output the current monitor state, 0 = idle, 1 = alarm, 2 = alert
  -B, --brightness [value]       : Output the current brightness, set to value if given
  -C, --contrast [value]         : Output the current contrast, set to value if given
  -H, --hue [value]              : Output the current hue, set to value if given
  -O, --colour [value]           : Output the current colour, set to value if given
  -i, --image [image_index]      : Write captured image to disk as <monitor_name>.jpg, last image captured
                                   or specified ring buffer index if given.
  -S, --scale <scale_%ge>        : With --image specify any scaling (in %) to be applied to the image
  -t, --timestamp [image_index]  : Output captured image timestamp, last image captured or specified
                                   ring buffer index if given
  -R, --read_index               : Output ring buffer read index
  -W, --write_index              : Output ring buffer write index
  -e, --event                    : Output last event index
  -f, --fps                      : Output last Frames Per Second captured reading
  -z, --zones                    : Write last captured image overlaid with zones to <monitor_name>-Zones.jpg
  -a, --alarm                    : Force alarm in monitor, this will trigger recording until cancelled with -c
  -n, --noalarm                  : Force no alarms in monitor, this will prevent alarms until cancelled with -c
  -c, --cancel                   : Cancel a forced alarm/noalarm in monitor, required after being enabled with -a or -n
  -u, --suspend                  : Suspend detection, useful to prevent bogus alarms when panning etc
  -r, --resume                   : Resume detection after a suspend
  -U, --username <username>      : When running in authenticated mode the username and
  -P, --password <password>      : and password combination of the given user
  -A, --auth <authentication>    : Pass authentication hash string instead of user details
[Wed Jul 27 21:51:12 2005] [error] [client 10.10.6.2] Premature end of script headers: zms
Error, unable to authenticate user




with auth set to encoded:

access.log:
Code:
10.10.6.2 - - [27/Jul/2005:21:53:18 -0400] "GET /cgi-bin/zms?mode=jpeg&monitor=2&scale=100&maxfps=15&auth=6570a71238f25a3dada0ec3613c7dc7d&rand=1122515585 HTTP/1.1" 500 644 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4"
10.10.6.2 - - [27/Jul/2005:21:55:19 -0400] "GET /security/index.php?view=watch&mid=2 HTTP/1.1" 200 1007 "http://its/security/index.php" "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4"
10.10.6.2 - - [27/Jul/2005:21:55:19 -0400] "GET /security/index.php?view=watchmenu&mode=&mid=2&scale=100&control= HTTP/1.1" 200 1521 "http://its/security/index.php?view=watch&mid=2" "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4"
10.10.6.2 - - [27/Jul/2005:21:55:19 -0400] "GET /security/index.php?view=watchfeed&mode=&mid=2&scale=100&control= HTTP/1.1" 200 569 "http://its/security/index.php?view=watch&mid=2" "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4"
10.10.6.2 - - [27/Jul/2005:21:55:19 -0400] "GET /security/index.php?view=watchevents&max_events=10&mid=2 HTTP/1.1" 200 10337 "http://its/security/index.php?view=watch&mid=2" "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4"
10.10.6.2 - - [27/Jul/2005:21:55:19 -0400] "GET /security/index.php?view=watchstatus&mid=2&control= HTTP/1.1" 200 743 "http://its/security/index.php?view=watch&mid=2" "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4"
10.10.6.2 - - [27/Jul/2005:21:55:19 -0400] "GET /cgi-bin/zms?mode=jpeg&monitor=2&scale=100&maxfps=15&auth=06658caa328ae97cc35ce8838656e8e6&rand=1122515719 HTTP/1.1" 500 644 "http://its/security/index.php?view=watchfeed&mode=&mid=2&scale=100&control=" "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4"


error.log:
Code:
Error, unable to authenticate user
Error, unable to authenticate user
[Wed Jul 27 21:53:18 2005] [error] [client 10.10.6.2] Premature end of script headers: zms
Error, unable to authenticate user
[Wed Jul 27 21:55:19 2005] [error] [client 10.10.6.2] Premature end of script headers: zms, referer: http://its/security/index.php?view=watchfeed&mode=&mid=2&scale=100&control=


I enabled auth using the 'options' button in the web interface, and restarted zoneminder in between all changes. If I turn auth off completely, it works again.

Thanks for any suggestions..


Thu Jul 28, 2005 3:18 am
Profile
User avatar

Joined: Fri Mar 05, 2004 5:47 pm
Posts: 5218
Location: /USA/Washington/Seattle
Post 
You might want to follow this thread if you are using PHP4.4
http://www.zoneminder.com/forums/viewtopic.php?t=4705
Regards,
Cordel


Thu Jul 28, 2005 3:37 am
Profile WWW
Site Admin
User avatar

Joined: Wed Jul 09, 2003 3:07 pm
Posts: 5221
Location: Bristol, UK
Post 
On another thought, you don't have any strange characters in the username or password by any chance?

Phil


Thu Jul 28, 2005 10:14 am
Profile ICQ YIM WWW
Site Admin
User avatar

Joined: Wed Jul 09, 2003 3:07 pm
Posts: 5221
Location: Bristol, UK
Post 
Actually scratch that. I can see it using auth strings. You could try changing the auth mode (Options->System->ZM_AUTH_METHOD) and see if that makes any difference.

Phil


Thu Jul 28, 2005 10:16 am
Profile ICQ YIM WWW

Joined: Tue Mar 30, 2004 5:31 pm
Posts: 17
Post 
PHP 4.3.10 (debian package). No weird auth strings. I've tried with both auth methods (hashed and plain, sorry, i called hashed "encoded" in my post) - they give different output, as I showed, but neither works. This is zm-1.21.3.


Thu Jul 28, 2005 2:51 pm
Profile
Site Admin
User avatar

Joined: Wed Jul 09, 2003 3:07 pm
Posts: 5221
Location: Bristol, UK
Post 
This is odd. Zmu seems to think it's being passed additional options but I can't see what they are. It may be we have to add debug to the php to see what is being invoked.

For now though you could try setting ZM_DBG_LEVEL_zmu to 9, and ZM_DBG_PRINT to 1 and then running zmu from the command line. It should emit a bit more debug about the authentication process which might help.

Phil


Fri Jul 29, 2005 12:43 pm
Profile ICQ YIM WWW

Joined: Tue Mar 30, 2004 5:31 pm
Posts: 17
Post Solved
Solved:

I was missing libcrypt.a (from debian package libssl-dev). Only noticed while I was trying to add in --with-ffmpeg and noticed the message scroll by as a warning while running configure.

This should probably be made more prominent, as it was very easy to miss and caused some very strange symptoms.


Mon Sep 19, 2005 8:46 pm
Profile

Joined: Thu Jul 26, 2012 8:47 pm
Posts: 1
Post Re: Authentication mode + streaming
Hi, im having the same problem in a ubuntu 12.04 64bits.

i installed libssl-dev but didnt help. If i turn on the autentication i cant see any image.

Any ideas ?


Thu Jul 26, 2012 9:02 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 8 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group