Page 1 of 1

Zone setup - no image

Posted: Sun Nov 26, 2006 5:27 pm
by liderbugzm
Linux FC-4. Camera & events are working. I can watch an event. However when I click on Zones the window pops up - blank (broken img). If I copy an image from the events dir to cam-Zones.jpg - 'then' I have a image and can define an area (I think). This is not what I read in the Manual. It seems to, well ... automagicly appear.
A pointer or two please.

Tks

Posted: Sun Nov 26, 2006 5:30 pm
by jameswilson
check your logs its usually a permission problem on the images folder

Forgot to add

Posted: Sun Nov 26, 2006 5:43 pm
by liderbugzm
Permissions on the image subdir are 777. Also if I see ".../zm_manual/images/console2.png" right the camera name is a link - except on my page, it's just the name
10. deck1 Modect /dev/video1 (2) 12
Not sure how to show as links but "deck1" ... ain't.

thanks

Got some information

Posted: Mon Nov 27, 2006 2:01 am
by liderbugzm
As root - command line
/usr/local/bin/zmdc.pl check returns "running" as apache - stopped
and when zm_funcs.php:daemonCheck runs zmdc.pl check the line
my $server_up = connect ( CLIENT, $saddr ); returns 1, operation not permitted.
If I set the return in zm_func to "running" my camera name becomes a link. I can pop up the monitor window. I haven't been able to google or forum the ans. I've checked permissions, env. Drawing a blank.

Posted: Tue Nov 28, 2006 2:43 am
by Manwe
I'm getting the same problem... any ideas?

Posted: Tue Nov 28, 2006 2:46 am
by Manwe
additionally I've found an error in the zmdc.log file:

28/11/06 03:30:12 008921 zmdc[501].ERR ['zmc -m 1' exited abnormally, exit status 255]

that's the only error I have found in all logs.

:(

ZMU call without monitor id

Posted: Tue Nov 28, 2006 2:54 pm
by liderbugzm
Here's one problem I'm tracking. I start ZM, wait a few seconds then click
on one of the "zone" links and up pops the window - empty.
I added this (line 262 in zm_monitor)
Debug( 1, ( "1. %x %d %o %d", (config.shm_key&0xffffff00)|id, shm_size, IPC_CREAT|0700, errno ));
just after the shmget . The following is the DBout.
Notice the line I've marked <<< calling a zmu sans monitor.

zmc_m20[29496].DB1-zm_monitor.cpp/262 [1. 7a6d2014 36865188 1700 0]
zmf_m18[29514].DB1-zm_monitor.cpp/262 [1. 7a6d2012 23988 1700 0]
zmf_m18[29516].DB1-zm_monitor.cpp/262 [1. 7a6d2012 23988 1700 0]
zma_m18[29520].DB1-zm_monitor.cpp/262 [1. 7a6d2012 23988 1700 0]
zma_m18[29522].DB1-zm_monitor.cpp/262 [1. 7a6d2012 23988 1700 0]
zmf_m19[29530].DB1-zm_monitor.cpp/262 [1. 7a6d2013 36865188 1700 0]
zma_m19[29536].DB1-zm_monitor.cpp/262 [1. 7a6d2013 36865188 1700 0]
zmf_m18[29562].DB1-zm_monitor.cpp/262 [1. 7a6d2012 23988 1700 0]
zma_m18[29568].DB1-zm_monitor.cpp/262 [1. 7a6d2012 23988 1700 0]
zmu[29575].DB1-zm_monitor.cpp/262 [1. 7a6d2013 36865188 1700 13] <<<<<<<<
zmf_m18[29580].DB1-zm_monitor.cpp/262 [1. 7a6d2012 23988 1700 0]
zma_m18[29584].DB1-zm_monitor.cpp/262 [1. 7a6d2012 23988 1700 0]

Going to be late to work - more later.
:(

Posted: Wed Nov 29, 2006 12:27 pm
by zoneminder
Errno 13 is permission denied. Can you check using ipcs -m that your shared memory has not been created by root or anything like that?

No zone img - know what problem is - just not soultion

Posted: Sun Dec 03, 2006 6:14 pm
by liderbugzm
In zm_html_view_zones.php right off the bat the code does:
...... exec ("zmu -m $mid -z") >>>>>> NOT!

I can do exec ("ls /etc") and it returns a list a mile long, date, echo HelloWorld
FINE. zmu - nothing. I can put exec (zmu in a tst.php script and run it (http:127../tst.php) works great.

The $@^!#$ thing won't run from within zm_html_view_zones.php. I've tried php:SafeMode, Unsafemode - HELP!!!!!!! Out of ideas. Forehead bleeding..........

minor error in above

Posted: Sun Dec 03, 2006 6:55 pm
by liderbugzm
http...tst.php - zmu does not run - again everthing else does

also in zm_funcs.php: function daemonCheck gets "stopped". If I run it from the command line, "running" ??? Something in ENV ???

zoneS.php won't write Zone.jpg - SELinux problem

Posted: Sun Dec 03, 2006 8:14 pm
by liderbugzm
SELinux SELinux SELinux SELinux SELinux SELinux

I had to run "system-config-securitylevel" and tell it Don't worry about httpd"

I now have 206W1-Zones.jpg in zm/images.

:evil: :evil: :evil: :evil: :evil: :evil: :evil: :D

ave huge headache.

I meant to add yesterday

Posted: Mon Dec 04, 2006 4:24 pm
by liderbugzm
php.net : exec : 3d post
> When using Red Hat Fedora, beware of Security Enhanced Linux, SELinux.
> Quoted from Red Hat: "The security goal is to make sure that Apache HTTP is only
> reading the static Web content, and not doing anything else such as writing to the content,
> connecting to database sockets, reading user home directories, etc."

So the reason exec ("ls") etc works and exec ("zmu") doesn't is because zmu is using sockets and SELinux checks for http pages using sockets and says "Not today!". Turning off HTTP in the selinux.conf seems to leave a security hole. Maybe one of these days we can say CheckHTTP, except: zma, zmb ,mzc, ...

Posted: Wed Dec 06, 2006 12:25 am
by zoneminder
Thanks for letting us know. It may be worth adding this to the FAQ I think, though it doesn't get asked very often as such. But obviously is a big pain when it happens. I just automatically disable selinux on any box I get, which is probably a bad habit.

Posted: Wed Dec 06, 2006 1:18 am
by liderbugzm
Thought: FAQ's need ... faq:FC4, faq:Ubunta, faq:MS(ucks) [just kidd'n just kidd'n]

Also I posted the question at
http://www.fedoraforum.org/forum/forumd ... rune=&f=44
The ans, Yup, thats the way it works.

Hey, but now? Working just the way the book says it's suppose to work. I'm a happy camper. 1=fixed Bt878, 2=Axis2100, 3=Axis206W, 4=tbd :roll: (there is She, Who MUST be obeyed). The 2100 is publicly avail at http://www.blackforest-co.com/ (top right).