Php error opening zones to edit

Forum for questions and support relating to the 1.28.x releases only.
Locked
iitywygms
Posts: 123
Joined: Thu Nov 08, 2012 5:19 am

Php error opening zones to edit

Post by iitywygms »

Hi All

zoneminder 1.28.109-tru amd64
apache2 2.4.7-1ubunt amd64
ubuntu 14.04.3

So I have everything working great.
Except being able to see images while opening zones to configure them. Just a white screen with the little picture symbol in the upper left corner.

Zoneminder does not log any error.
apache error.log shows this.

PHP Notice: Undefined index: object in /usr/share/zoneminder/www/includes/actions.php on line 769, referer: https://mywebsite.net/zm/

This is line 769 of actions.php

if ( $_REQUEST['object'] == 'server' ) {

I am not sure how to go about correcting this or if I even have gathered all the correct information to help fix this.
If anyone can offer some help please do.

Thanks
bbunge
Posts: 2934
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Php error opening zones to edit

Post by bbunge »

Did you:

Open Zoneminder. Click on Options - Paths

Change PATH_ZMS to /zm/cgi-bin/nph-zms
iitywygms
Posts: 123
Joined: Thu Nov 08, 2012 5:19 am

Re: Php error opening zones to edit

Post by iitywygms »

Yes.

I did not have any live camera images nor could I view events as a video before I did that.

/zm/cgi-bin/nph-zms is the current path.
iitywygms
Posts: 123
Joined: Thu Nov 08, 2012 5:19 am

Re: Php error opening zones to edit

Post by iitywygms »

I turned on debugging logging in options. Not sure if that will help or not. I can post that information if someone can tell me where it is stored.
I am also trying zmninja. I cant view live images in the desktop version. Searching the forums, it also said to make sure to Change PATH_ZMS to /zm/cgi-bin/nph-zms

So it appears this is the reason both zoneminder and zmninja are having issues. But I am positive that I have the path set correctly.
I can view live images in zoneminder no problem. Just not the zone configuration window.
I am happy to follow and instructions or suggestions anyone has.

Thanks.
User avatar
asker
Posts: 1553
Joined: Sun Mar 01, 2015 12:12 pm

Re: Php error opening zones to edit

Post by asker »

Not being able to see an image while editing zones usually means a permission problem with your images directory. Try doing chown -R www-data to your image directory

That php error you are seeing is for a different reason.
I no longer work on zmNinja, zmeventnotification, pyzm or mlapi. I may respond on occasion based on my available time/interest.

Please read before posting:
How to set up logging properly
How to troubleshoot and report - ES
How to troubleshoot and report - zmNinja
ES docs
zmNinja docs
iitywygms
Posts: 123
Joined: Thu Nov 08, 2012 5:19 am

Re: Php error opening zones to edit

Post by iitywygms »

This is what they are currently set as.

drwxrwxrwx 5 root root 64 Aug 4 2014 .
drwxr-xr-x 28 root root 4096 Dec 3 11:23 ..
drwxrwxrwx 2 kevin kevin 8 Aug 18 2014 errors
drwxrwxrwx 12 www-data www-data 4096 Dec 3 23:32 events
drwxrwxrwx 2 www-data www-data 32 Dec 6 12:34 images

I ran that command anyway. No change.

My events and images are stored on a different drive if that matters.
The path is /D3/events
/D3/images

Everything else works. That is what really confuses me. Live video, events, images, everything. Just no image while configuring zones.

This issue has been with me for quite some time. If you go back to this post I made a while back, you can see the way I had to "fix" it. But I know that is not the correct way. And I would really like to figure this out.
Also, since that time I have completely purged and reinstalled zoneminder and apache.

viewtopic.php?f=31&t=22501&p=85522#p85522

My server runs mythtv-backend and zoneminder, if that gives any clue?
iitywygms
Posts: 123
Joined: Thu Nov 08, 2012 5:19 am

Re: Php error opening zones to edit

Post by iitywygms »

Not sure if I am offering anything helpful but here is some more info.

When I click on zones, zoneminder creates/updates a jpg image in the image directory.
but the permission looks different than what I see in events folder.

-rw-r--r-- 1 www-data www-data 73679 Dec 7 15:23 Zones2.jpg

Does this look like the correct permission?
iitywygms
Posts: 123
Joined: Thu Nov 08, 2012 5:19 am

Re: Php error opening zones to edit

Post by iitywygms »

Success!

From this post.

viewtopic.php?f=32&t=23101&p=87695&hili ... tur#p87695

Even though both are writable and owned by www-data it was outside the webroot according to apache so it was not being served. By changing the path in the configuration utility to just 'images' instead of '/var/cache/zoneminder/images' I was able to see the images in the zones editor.

Same fix worked for me also.

Only took a year to figure it out lol.
Locked