Camera settings webpage show HTTP ERROR 500

Previous development branch now released as 1.36
Locked
nubee
Posts: 4
Joined: Sun Jan 10, 2021 6:16 pm

Camera settings webpage show HTTP ERROR 500

Post by nubee »

I just upgraded my ubuntu 14.04 server zoneminder from 1.32 to 1.35.2 and found this HTTP error 500 message when I click on settings to adjust my camera brightness,after I checked the apache2 error log at /var/log/apache2/error.log it shows

[Sun Jan 10 11:37:47.161918 2021] [:error] [pid 16982] [client 192.168.2.51:55190] PHP Fatal error: Can't use method return value in write context in /usr/share/zoneminder/www/skins/classic/views/settings.php on line 31, referer: http://192.168.2.50/zm/index.php?view=watch&mid=1

it was working before upgrade to 1.35.2 and I really need this function to adjust the camera as my camera video is too dark to see anything.Thanks.
nubee
Posts: 4
Joined: Sun Jan 10, 2021 6:16 pm

Re: Camera settings webpage show HTTP ERROR 500

Post by nubee »

Found a temporary solution to adjust the camera brightness by giving command "sudo zmu -m 1 -B70 -v -U -P"
this solved my problem,but will be really nice if I can just do it on the camera setting webpage.
User avatar
knight-of-ni
Posts: 2404
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: Camera settings webpage show HTTP ERROR 500

Post by knight-of-ni »

There a couple of red flags with what you posted. We have moved on from Ubuntu Trusty and don't support it anymore. That doesn't mean you can't get it working, but it's likely that we have, either recently or will in the near future, make/made changes that require a newer version of php than the one that ships with Trusty.

So even if you do get this particular problem solved, I'd highly recommend you upgrade to a more recent distro, if you want to stay up to date with the most recent version of zoneminder. The problems will only increase over time.

The second thing of concern is the path the error message points to: /usr/share/zoneminder/www/skins/classic/views/settings.php

That file doesn't exist in our master branch as you can see here:
https://github.com/ZoneMinder/zoneminde ... ssic/views

The settings view was deleted in favor of a settings modal, which lives elsewhere in the source tree: https://github.com/ZoneMinder/zoneminde ... jax/modals

This implies that something isn't right with your installation of zoneminder. You may have a mix of old and new files.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
nubee
Posts: 4
Joined: Sun Jan 10, 2021 6:16 pm

Re: Camera settings webpage show HTTP ERROR 500

Post by nubee »

knight-of-ni wrote: Tue Jan 12, 2021 1:47 pm There a couple of red flags with what you posted. We have moved on from Ubuntu Trusty and don't support it anymore. That doesn't mean you can't get it working, but it's likely that we have, either recently or will in the near future, make/made changes that require a newer version of php than the one that ships with Trusty.

So even if you do get this particular problem solved, I'd highly recommend you upgrade to a more recent distro, if you want to stay up to date with the most recent version of zoneminder. The problems will only increase over time.

The second thing of concern is the path the error message points to: /usr/share/zoneminder/www/skins/classic/views/settings.php

That file doesn't exist in our master branch as you can see here:
https://github.com/ZoneMinder/zoneminde ... ssic/views

The settings view was deleted in favor of a settings modal, which lives elsewhere in the source tree: https://github.com/ZoneMinder/zoneminde ... jax/modals

This implies that something isn't right with your installation of zoneminder. You may have a mix of old and new files.
Thank you so much for your detailed and informative reply,the reason why I still stay in the older ubuntu distro is that I can not make my capture card Techwell TW6802 work properly with latest ubuntu distro and zoneminder,so until the hardware compatibility issue solved,I am stuck with ubuntu 14.04.
Last edited by nubee on Tue Jan 12, 2021 2:26 pm, edited 1 time in total.
User avatar
knight-of-ni
Posts: 2404
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: Camera settings webpage show HTTP ERROR 500

Post by knight-of-ni »

Have you considered replacing that capture card with an ip video encoder? That will cure all your problems.

Used Axis encoders go for peanuts on EBay, like this 241Q:
https://www.ebay.com/itm/Axis-241Q-4-In ... R&LH_BIN=1

It streams mjpeg. A more modern version that streams mpeg costs a little more but is still quite affordable:
https://www.ebay.com/itm/Axis-0417-004- ... F&LH_BIN=1

I am using both of these encoders with ZoneMinder. They work well and don't require any drivers.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
nubee
Posts: 4
Joined: Sun Jan 10, 2021 6:16 pm

Re: Camera settings webpage show HTTP ERROR 500

Post by nubee »

knight-of-ni wrote: Tue Jan 12, 2021 2:25 pm Have you considered replacing that capture card with an ip video encoder? That will cure all your problems.

Used Axis encoders go for peanuts on EBay, like this 241Q:
https://www.ebay.com/itm/Axis-241Q-4-In ... R&LH_BIN=1

It streams mjpeg. A more modern version that streams mpeg costs a little more but is still quite affordable:
https://www.ebay.com/itm/Axis-0417-004- ... F&LH_BIN=1

I am using both of these encoders with ZoneMinder. They work well and don't require any drivers.
That is a good idea,I will look into it,Thank you very much.
Locked