fixing status label in index.php

Support and queries relating to all previous versions of ZoneMinder
Locked
bzo
Posts: 14
Joined: Wed Jul 07, 2004 7:23 pm

fixing status label in index.php

Post by bzo »

Just upgraded from 1.19.4 to 1.20.1. Took a bit of work, but everything seems to be working fine now. The only remaining problem, which is just cosmetic, is that the status doesn't show correctly. It always says "Stopped" no matter what. Any hints on how to debug this problem? Thanks!
bzo
Posts: 14
Joined: Wed Jul 07, 2004 7:23 pm

Post by bzo »

ok, did some more looking around and it seems like the problem is that the php calls are not getting the output from the various perl scripts. In zm_funcs.php/daemonCheck(), $result = exec ($string) where

$string is /usr/local/bin/zmdc.pl check

doesn't populate $result. Running the above command in a shell works fine and prints out "running"

A similar thing seems to be happening in zm_html_view_console.php where $monitor['zmc'] and $monitor['zma'] are empty because they are not capturing the results of the scripts they are calling. This causes the sources to all appear red in the display.

Any help appreciated on figuring out this problem.
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

Is is possible you originally ran zmdc.pl as root and so the /tmp/zmdc.sock is owned by root and so your apache user doesn't have permissions?

Phil
bzo
Posts: 14
Joined: Wed Jul 07, 2004 7:23 pm

Post by bzo »

that may have been it? I was playing around with it and it started working. I was tweaking the perl scripts for the RH9 issue, so I'm not sure whether it was that and/or the restarts that fixed it. In any case, thanks for the response!
Locked