PHP errors and other issues with bluecherry 3.1.2 package install on Debian 12

I have started on a project to upgrade our bluecherry V2 servers and clients to V3 and as part of that I have been setting up two new bluecherry 3.1.2 servers using package installs on two new, Debian 12 servers. Installation was fine, but on configuring the servers, several tasks in the management web GUI are failing and generating Ajax and PHP errors in the /var/log/nginx/bluecherry-error.log log file.

In the examples below, the name of the bluecherry server is: qba-vms-01. The failing tasks include:

1. Trying to update or add new bluecherry users.

In the examples below, the name of the bluecherry server is: qba-vms-01

The web GUI displays:

This page isn’t working
qba-vms-01 is currently unable to handle this request.
HTTP ERROR 500

and the following errors are logged in the nginx bluecherry-error log:

2024/09/02 12:20:48 [error] 132397#132397: *7160 FastCGI sent in stderr: “PHP message: PHP Fatal error: Uncaught Error: Non-static method user::checkUserData() cannot be called statically in /usr/share/bluecherry/www/lib/lib.php:459
Stack trace:
#0 /usr/share/bluecherry/www/ajax/update.php(54): user::update()
#1 /usr/share/bluecherry/www/ajax/update.php(30): update->newUser()
#2 /usr/share/bluecherry/www/lib/Controller.php(124): update->postData()
#3 /usr/share/bluecherry/www/lib/Route.php(75): Controller->start()
#4 /usr/share/bluecherry/www/index.php(16): Route->start()
#5 {main}
thrown in /usr/share/bluecherry/www/lib/lib.php on line 459” while reading response header from upstream, client: 172.20.40.115, server: , request: “POST /ajax/update.php HTTP/1.1”, upstream: “fastcgi://unix:/etc/alternatives/php-fpm.sock:”, host: “qba-vms-01:7001”, referrer: https://qba-vms-01:7001/users?id=new
2024/09/02 12:20:48 [error] 132397#132397: *7160 FastCGI sent in stderr: “PHP message: PHP Fatal error: Uncaught Error: Call to undefined method update::getData() in /usr/share/bluecherry/www/lib/Controller.php:137
Stack trace:
#0 /usr/share/bluecherry/www/lib/Route.php(75): Controller->start(
#1 /usr/share/bluecherry/www/index.php(16): Route->start()
#2 {main}
thrown in /usr/share/bluecherry/www/lib/Controller.php on line 137” while reading response header from upstream, client: 172.20.40.115, server: , request: “GET /ajax/update.php HTTP/1.1”, upstream: “fastcgi://unix:/etc/alternatives/php-fpm.sock:”, host: “qba-vms-01:7001”, referrer: https://qba-vms-01:7001/users?id=new

2. Adding devices seems to work but updating a device that has already been added causes errors:

The web displays:

qba-vms-01:7001 says
err ajax

And the following message is logged in the nginx bluecherry-error log:

2024/09/02 12:36:14 [error] 132398#132398: *7225 FastCGI sent in stderr: “PHP message: PHP Warning: Trying to access array offset on value of type bool in /usr/share/bluecherry/www/lib/lib.php on line 861; PHP message: PHP Warning: Trying to access array offset on value of type null in /usr/share/bluecherry/www/lib/lib.php on line 861; PHP message: PHP Fatal error: Uncaught TypeError: array_key_exists(): Argument #2 ($array) must be of type array, null given in /usr/share/bluecherry/www/lib/lib.php:799
Stack trace:
#0 /usr/share/bluecherry/www/ajax/editip.php(24): ipCamera->checkConnection()
#1 /usr/share/bluecherry/www/lib/Controller.php(124): editip->postData()
#2 /usr/share/bluecherry/www/lib/Route.php(75): Controller->start()
#3 /usr/share/bluecherry/www/index.php(16): Route->start()
#4 {main}
thrown in /usr/share/bluecherry/www/lib/lib.php on line 799” while reading response header from upstream, client: 172.20.40.115, server: , request: “POST /ajax/editip.php HTTP/1.1”, upstream: “fastcgi://unix:/etc/alternatives/php-fpm.sock:”, host: “qba-vms-01:7001”, referrer: “https://qba-vms-01:7001/ajax/editip.php?id=2
2024/09/02 12:36:14 [error] 132398#132398: *7225 FastCGI sent in stderr: "PHP message: PHP Warning: Trying to access array offset on value of type null in /usr/share/bluecherry/www/template/ajax/editip.php on line 8; PHP message: PHP Warning: Trying to access array offset on value of type null in /usr/share/bluecherry/www/template/ajax/editip.php on line 26; PHP message: PHP Warning: Trying to access array offset on value of type null in /usr/share/bluecherry/www/template/ajax/editip.php on line 37; PHP message: PHP Warning: Trying to access array offset on value of type null in /usr/share/bluecherry/www/template/ajax/editip.php on line 42; PHP message: PHP Warning: Trying to access array offset on value of type null in /usr/share/bluecherry/www/template/ajax/editip.php on line 50; PHP message: PHP Warning: Trying to access array offset on value of type null in /usr/share/bluecherry/www/template/ajax/editip.php on line 58; PHP message: PHP Warning: Trying to access array offset on value of type null in /usr/share/bluecherry/www/template/ajax/editip.php on line 66; PHP message: PHP Warning: Trying to access array offset on value of type null in /usr/share/bluecherry/www/template/ajax/editip.php on line 74; PHP message: PHP Warning: Trying to access array offset on value of type null in /usr/share/bluecherry/www/template/ajax/editip.php on line 84; PHP message: PHP Warning: Trying to access array offset on value of type null in /usr/share/bluecherry/www/template/ajax/editip.php on line 89; PHP message: PHP Warning: Trying to access array offset on value of type null in /usr/share/bluecherry/www/template/ajax/editip.php on line 94; PHP message: PHP Warning: Trying to access array offset on value of type null in /usr/share/bluecherry/www/template/ajax/editip.php on line 102; PHP message: PHP Warning: Trying to access array offset on value of type null in /usr/share/bluecherry/www/template/ajax/editip.php on line 112; PHP message: PHP Warning: Trying to access array offset on value of type null in /usr/

3. Unable to access event history from clients

The server is recording media information and camera events into the mysql database tables, but neither the V2 nor V3 clients are able to access or display them.

The bluecherry V3 windows client simply shows 0 events and does not generate errors.

The bluecherry V2 windows clients also show 0 events, but the V2 clients also cause the server to continuously log the following errors to the nginx bluecherry-error.log file, even when not trying to browse for events:

2024/09/02 10:47:39 [error] 132392#132392: *3597 FastCGI sent in stderr: “PHP message: PHP Warning: Undefined array key “media_duration” in /usr/share/bluecherry/www/ajax/events/eventsIndex.php on line 128” while reading response header from upstream, client: 172.20.40.127, server: , request: “GET /events/?limit=50 HTTP/1.1”, upstream: “fastcgi://unix:/etc/alternatives/php-fpm.sock:”, host: “qba-vms-01.bundysugar.com.au:7001”

4. The server is not writing anything to the /var/log/bluecherry.log file.

The file exists but remains empty.

Some help with the above issues would be appreciated.

Thanks, we are aware of some issues with Debian 12 that have been reported over the weekend, we are looking into it.

As far as #4, that is also a known issue…the logs aren’t rotating like they should. Check bluecherry.log.1

There is no bluecherry.log.1 file or any other bluecherry.log.* file in /var/log. The only bluecherry file in the /var/log directory is bluecherry.log. The file is empty and it has never been written to as the date stamp on the file is still the date the file was created when bluecherry was installed.