Page 1 of 1

Onvifprobe.php error 500

Posted: Mon Feb 25, 2019 10:03 pm
by shardick
Hi,
i'm using 1.30.4 on Raspbian 9 (Raspberry Pi 3B+) and i'm getting error 500 when accessing onvifprobe.php page from monitor

Below the apache error.log:
[Mon Feb 25 22:45:10.617780 2019] [:error] [pid 25646] [client 10.0.0.24:54148] PHP Parse error: syntax error, unexpected end of file in /usr/share/zoneminder/www/skins/classic/views/onvifprobe.php on line 285, referer: http://10.0.0.35/zm/index.php?view=monitor&mid=2

Hope this helps.

Thanks

Re: Onvifprobe.php error 500

Posted: Tue Feb 26, 2019 2:35 am
by bbunge
ONVIF monitor does not always work on this version of Zoneminder. Likely not just an issue with the Pi. You are better off using VLC or an Android ONVIF app.

I will fire up my Pi tomorrow to see if I get the same error.

Re: Onvifprobe.php error 500

Posted: Tue Feb 26, 2019 1:28 pm
by bbunge
Did not get an ONVIF error on my fresh Pi install.

Use a modified install procedure:

Install additional LAMP components Mariadb server (recommended)

apt install php mariadb-server php-mysql libapache2-mod-php7.0 apache2

Secure Mariadb, create root password et. al.

mysql_secure_installation

Edit sources.list

nano /etc/apt/sources.list

For Pi uncomment:

deb-src http://raspbian.raspberrypi.org/raspbian/ stretch main contrib non-free$

Ctrl+o Enter to save

Ctrl+x to exit

After you have added the necessary line in /etc/apt/sources.list the first package to install is deb-multimedia-keyring.

apt update

Install Zoneminder

apt install zoneminder

Set permissions of /etc/zm/zm.conf to root:www-data 740

chmod 740 /etc/zm/zm.conf

chown root:www-data /etc/zm/zm.conf

Enable Zoneminder service to start at boot

systemctl enable zoneminder.service

Add www-data to the sudo group (to enable use of local video devices)

adduser www-data video

For Pi, Create Zoneminder database in Mariadb (Note: this also creates the default Zoneminder user and permissions in MySQL)

mysql -uroot -p < /usr/share/zoneminder/db/zm_create.sql

mysql -uroot -p -e "grant all on zm.* to 'zmuser'@localhost identified by 'zmpass';"

mysqladmin -uroot -p reload


Start Zoneminder

systemctl start zoneminder.service

Check to see that Zoneminder is running

systemctl status zoneminder.service

Enable CGI and Zoneminder configuration in Apache.

a2enmod cgi

a2enmod rewrite

a2enconf zoneminder

Add timezone to PHP

sed -i "s/;date.timezone =/date.timezone = $(sed 's/\//\\\//' /etc/timezone)/g" /etc/php/7.0/apache2/php.ini

Change permissions in /usr/share/zoneminder/

chown -R www-data:www-data /usr/share/zoneminder/


Restart Apache

service apache2 restart

Re: Onvifprobe.php error 500

Posted: Tue Feb 26, 2019 8:46 pm
by shardick
did the same procedure (as found on zoneminder wiki)

it seems a phone syntax error, read the phone source code but without finding the error.

Re: Onvifprobe.php error 500

Posted: Tue Feb 26, 2019 9:23 pm
by bbunge
The procedure was changed on the wiki this morning. There are differences from the STDs Debian install. Suggest you start with a fresh Raspbian and try again.

Re: Onvifprobe.php error 500

Posted: Sat Mar 02, 2019 7:41 pm
by shardick
ok, thanks (I've to enable the mail notifications :D)

how to uninstall it?

Re: Onvifprobe.php error 500

Posted: Thu Jun 06, 2019 4:23 pm
by lselinger
Has anyone else seen this? I've done a fresh install from scratch 2 times and still get this 500 error. I' following the install on the wiki from the Raspberry Pi 3B Zoneminder 1.30.4 section of This page: https://wiki.zoneminder.com/Debian_9_64 ... der_1.30.4

The error is the same as previous:

Code: Select all

syntax error, unexpected end of file in /usr/share/zoneminder/www/skins/classic/views/onvifprobe.php on line 285
the weird thing is that file doesn't even have a line 285:

Code: Select all

# wc -l /usr/share/zoneminder/www/skins/classic/views/onvifprobe.php
284 /usr/share/zoneminder/www/skins/classic/views/onvifprobe.php
I'm at a loss right now lol ... redoing gthe steps a few times to make sure they were done to a 'T' has not improved the situation. Is it possible there is a better guide or possibly something else I'm missing? For posterity I'm using the raspian lite image

Re: Onvifprobe.php error 500

Posted: Thu Jun 06, 2019 5:04 pm
by lselinger
Never mind now all of a sudden it's all good :shock:
lselinger wrote: Thu Jun 06, 2019 4:23 pm Has anyone else seen this? I've done a fresh install from scratch 2 times and still get this 500 error. I' following the install on the wiki from the Raspberry Pi 3B Zoneminder 1.30.4 section of This page: https://wiki.zoneminder.com/Debian_9_64 ... der_1.30.4

The error is the same as previous:

Code: Select all

syntax error, unexpected end of file in /usr/share/zoneminder/www/skins/classic/views/onvifprobe.php on line 285
the weird thing is that file doesn't even have a line 285:

Code: Select all

# wc -l /usr/share/zoneminder/www/skins/classic/views/onvifprobe.php
284 /usr/share/zoneminder/www/skins/classic/views/onvifprobe.php
I'm at a loss right now lol ... redoing gthe steps a few times to make sure they were done to a 'T' has not improved the situation. Is it possible there is a better guide or possibly something else I'm missing? For posterity I'm using the raspian lite image

Re: Onvifprobe.php error 500

Posted: Sun Jun 16, 2019 11:16 am
by mitchell_cj
People getting this message...
PHP Parse error: syntax error, unexpected end of file in /usr/share/zoneminder/www/skins/classic/views/onvifprobe.php on line 285

There are 2 stray curly braces in this file for some reason.
Edit the file and remove/comment out lines 103 & 107.

If your editor doesn't have line numbers...
find "function probeProfiles"
remove the line after "preg_match"...there are 2 of these in this function, remove both. there are a single line containing {

Re: Onvifprobe.php error 500

Posted: Tue Jun 25, 2019 6:54 am
by zm_user
Good morning,
I also have problem with

Code: Select all

 PHP Parse error: syntax error, unexpected end of file in /usr/share/zoneminder/www/skins/classic/views/onvifprobe.php on line 285 
I comment lines 103 & 107 as mitchell_cj suggested but now in error.log I see

Code: Select all

 PHP Fatal error:  Uncaught Error: Call to undefined method Logger::Debug() in /usr/share/zoneminder/www/skins/classic/views/onvifprobe.php:44\nStack trace:\n#0 /usr/share/zoneminder/www/skins/classic/views/onvifprobe.php(54): execONVIF('probe')\n#1 /usr/share/zoneminder/www/skins/classic/views/onvifprobe.php(148): probeCameras('')\n#2 /usr/share/zoneminder/www/index.php(213): require_once('/usr/share/zone...')\n#3 {main}\n  thrown in /usr/share/zoneminder/www/skins/classic/views/onvifprobe.php on line 44 
Does anybody meet this error and know how to resolve it?