Page 1 of 1

Undefined variables

Posted: Thu Oct 20, 2005 7:41 pm
by merced
I keep having issues with undefined variables. I think this is what is giving me so many problems with my initial setup.

Basically, when I go to the zm.php page to login, I notice that the title says:

Code: Select all

ZM_WEB_TITLE_PREFIX - Login
Where do I set this to what I'd like it to show? I tried in /etc/zm.conf but that didn't work.

I think once I understand this, I should be able to fix the other ZM_PATH_SOCKS, ZM_DIR_EVENTS, and Divide by Zero errors I'm experiencing.

Any thoughts?

--
Merced

Posted: Thu Oct 20, 2005 8:12 pm
by zoneminder
Are you sure you have run zmconfig.pl -noi?

Phil

Posted: Thu Oct 20, 2005 8:50 pm
by merced
Seeing as I don't see a "zmconfig.pl" script on my machine, I'll assume it's because I installed via a Gentoo package. I bet the ebuild isn't right. I'll attempt a manual install instead.

Thanks Phil!

Posted: Fri Oct 21, 2005 2:38 pm
by zoneminder
In that case it looks like the configuration has not been loaded into the database correctly but I don't know what in an ebuild would do this bit.

Phil

Posted: Fri Oct 21, 2005 4:03 pm
by lazyleopard
merced wrote:I installed via a Gentoo package.
The one in the main portage tree?

Posted: Fri Oct 21, 2005 8:49 pm
by merced
Yes, the one in the main portage tree. I put the following in my /etc/portage/package.keywords:

Code: Select all

www-misc/zoneminder ~x86
Unfortunately, it never runs the zmconfig.pl script and the source is the only place that has the script.

I just ended up using the ebuild from portage and downloading the source. I've got the entries in my database now. I'm just having a problem with recording. I keep seeing the following in my logs:

Code: Select all

zma_m7[19415]: ERR [Can't make events/7: Permission denied]
Incidentally, it's camera id 7 that is trying to record. I have apache:apache as the owner of the directory events. It was able to successfully create events/7 when I added the device via the web interface. However, it doesn't seem to be able to record to that directory.

Posted: Fri Oct 28, 2005 11:56 am
by jameswilson
can you create a folder manualyy in this directory as user apache?

Posted: Mon Oct 31, 2005 1:08 pm
by merced
jameswilson wrote:can you create a folder manualyy in this directory as user apache?
When I try to:

Code: Select all

su apache
as root, I get immediately logged out because the shell for the user apache is set to /bin/false.

If I change the shell to something, like /bin/bash, and then try to touch a file, it works just fine.

Again, it's strange that through the web interface, I'm able to add/change/delete sources and the changes are reflected in the events directory. For example, if I was to delete source id 7, the directory and the symbolic link would successfully be deleted from the events directory. If I then create a new source, it would be number 8, and the directory 8 and the corresponding symbolic link would be created in the events directory as the user apache. I'm getting no permission denied errors with this. It's only when I start to try and record something that the errors occur.

I even tried changing the directory from "events" to "newevents" but the error still comes back.

Code: Select all

Can't make newevents: Permission denied
What am I missing?

Posted: Mon Oct 31, 2005 4:10 pm
by jameswilson
daft question i assume zm and apache are actully using user apache?

Posted: Mon Oct 31, 2005 5:38 pm
by merced
Yep. When I look at who is the owner of the processes (zmdc.pl, zmc, etc.) it is apache. Again, when a new source gets added, the folder in events is successfully created with apache:apache as the owner.

I'm completely clueless. Would turning up the log verbosity help? How would I do that?

Posted: Mon Oct 31, 2005 5:44 pm
by jameswilson
im out sorry pal. way too deep for me now, Cordel is your man on this one i think

Posted: Mon Oct 31, 2005 5:51 pm
by merced
I just tried messing with it some more. Apparently with the gentoo install, it's trying to store to /usr/share/webapps/zoneminder/1.21.3/htdocs/events and not /var/www/localhost/htdocs/zoneminder/events! Go broken ebuild!

I think all of my errors earlier with manually building the install to get the variables inserted into the database combined with using the ebuild screwed things up.

I think I got it. Thanks for your help!

Posted: Mon Oct 31, 2005 5:53 pm
by jameswilson
so are you gonna alter the permissions for the ditrectory its trying to use or can you change the dir it uses?

Posted: Mon Oct 31, 2005 11:35 pm
by merced
I am going to:

Code: Select all

emerge -C zoneminder
on my Gentoo system and install zoneminder from source.

:D

Posted: Tue Nov 01, 2005 8:24 am
by lazyleopard
merced wrote: Apparently with the gentoo install, it's trying to store to /usr/share/webapps/zoneminder/1.21.3/htdocs/events and not /var/www/localhost/htdocs/zoneminder/events! Go broken ebuild!
That's a feature of the new wizzo way of installing webapps. :? The idea is that a master copy gets put in /usr/share/webapps/ and then you use the webapp admin tool (whose name I've blanked on) to install the copy you're actually going to run. It's intended to make it easier to keep multiple copies of a webapp on a single system, but it makes no sense for an app like zoneminder which isn't intended to have many independant installations running on one machine.