Undefined variables

Support and queries relating to all previous versions of ZoneMinder
Locked
merced
Posts: 13
Joined: Thu Oct 13, 2005 3:27 pm

Undefined variables

Post 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
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

Are you sure you have run zmconfig.pl -noi?

Phil
merced
Posts: 13
Joined: Thu Oct 13, 2005 3:27 pm

Post 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!
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post 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
User avatar
lazyleopard
Posts: 403
Joined: Tue Mar 02, 2004 6:12 pm
Location: Gloucestershire, UK

Post by lazyleopard »

merced wrote:I installed via a Gentoo package.
The one in the main portage tree?
Rick Hewett
merced
Posts: 13
Joined: Thu Oct 13, 2005 3:27 pm

Post 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.
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

can you create a folder manualyy in this directory as user apache?
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
merced
Posts: 13
Joined: Thu Oct 13, 2005 3:27 pm

Post 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?
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

daft question i assume zm and apache are actully using user apache?
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
merced
Posts: 13
Joined: Thu Oct 13, 2005 3:27 pm

Post 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?
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

im out sorry pal. way too deep for me now, Cordel is your man on this one i think
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
merced
Posts: 13
Joined: Thu Oct 13, 2005 3:27 pm

Post 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!
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

so are you gonna alter the permissions for the ditrectory its trying to use or can you change the dir it uses?
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
merced
Posts: 13
Joined: Thu Oct 13, 2005 3:27 pm

Post by merced »

I am going to:

Code: Select all

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

:D
User avatar
lazyleopard
Posts: 403
Joined: Tue Mar 02, 2004 6:12 pm
Location: Gloucestershire, UK

Post 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.
Rick Hewett
Locked