DVR General Settings page is missing SMTP Server Configuration

The DVR General Settings page accessed from the server’s web based management interface is missing the section for configuring the SMTP server. This has been missing for several of the past server updates and is still missing in 3.1.8.

The page is also missing the left column containing the configuration menu and the formatting of the page is inconsistent with style used for the rest of the management site. See image:

Which distribution are you using? I suspect this is because of a newer PHP version then some of the older distributions.

I am running Debian 12 (bookworm) with a native install of Bluecherry.

Versions for install packages for bluecherry, php, mariadb are:

bluecherry-node-onvif/bookworm,now 0.7.0 all [installed,automatic]
bluecherry/bookworm,now 3:3.1.8 amd64 [installed]
libdbd-mariadb-perl/stable,now 1.22-1+b1 amd64 [installed,automatic]
libmariadb3/stable,now 1:10.11.6-0+deb12u1 amd64 [installed,automatic]
mariadb-client-core/stable,now 1:10.11.6-0+deb12u1 amd64 [installed,automatic]
mariadb-client/stable,now 1:10.11.6-0+deb12u1 amd64 [installed,automatic]
mariadb-common/stable,now 1:10.11.6-0+deb12u1 all [installed,automatic]
mariadb-plugin-provider-bzip2/stable,now 1:10.11.6-0+deb12u1 amd64 [installed,automatic]
mariadb-plugin-provider-lz4/stable,now 1:10.11.6-0+deb12u1 amd64 [installed,automatic]
mariadb-plugin-provider-lzma/stable,now 1:10.11.6-0+deb12u1 amd64 [installed,automatic]
mariadb-plugin-provider-lzo/stable,now 1:10.11.6-0+deb12u1 amd64 [installed,automatic]
mariadb-plugin-provider-snappy/stable,now 1:10.11.6-0+deb12u1 amd64 [installed,automatic]
mariadb-server-core/stable,now 1:10.11.6-0+deb12u1 amd64 [installed,automatic]
mariadb-server/stable,now 1:10.11.6-0+deb12u1 amd64 [installed]
mysql-common/stable,now 5.8+1.1.0 all [installed,automatic]
php-auth-sasl/stable,now 1.1.0-1 all [installed,automatic]
php-cli/stable,now 2:8.2+93 all [installed,automatic]
php-common/stable,now 2:93 all [installed,automatic]
php-fpm/stable,now 2:8.2+93 all [installed,automatic]
php-mail-mime/stable,now 1.10.11-1 all [installed,automatic]
php-mail/stable,now 1.4.1-1.1 all [installed,automatic]
php-mbstring/stable,now 2:8.2+93 all [installed,automatic]
php-mysql/stable,now 2:8.2+93 all [installed,automatic]
php-net-smtp/stable,now 1.10.1-1 all [installed,automatic]
php-net-socket/stable,now 1.2.2-2 all [installed,automatic]
php-pear/stable,now 1:1.10.13+submodules+notgz+2022032202-2 all [installed,automatic]
php-sqlite3/stable,now 2:8.2+93 all [installed,automatic]
php-xml/stable,now 2:8.2+93 all [installed,automatic]
php8.2-cli/stable-security,now 8.2.26-1~deb12u1 amd64 [installed,automatic]
php8.2-common/stable-security,now 8.2.26-1~deb12u1 amd64 [installed,automatic]
php8.2-fpm/stable-security,now 8.2.26-1~deb12u1 amd64 [installed,automatic]
php8.2-mbstring/stable-security,now 8.2.26-1~deb12u1 amd64 [installed,automatic]
php8.2-mysql/stable-security,now 8.2.26-1~deb12u1 amd64 [installed,automatic]
php8.2-opcache/stable-security,now 8.2.26-1~deb12u1 amd64 [installed,automatic]
php8.2-readline/stable-security,now 8.2.26-1~deb12u1 amd64 [installed,automatic]
php8.2-sqlite3/stable-security,now 8.2.26-1~deb12u1 amd64 [installed,automatic]
php8.2-xml/stable-security,now 8.2.26-1~deb12u1 amd64 [installed,automatic]

I’ve created a bug for this - DVR General Settings page is missing SMTP Server Configuration (Ubuntu 24.04 / php 8.2) · Issue #728 · bluecherrydvr/bluecherry-apps · GitHub

Can you run:

tail -f /var/log/nginx/bluecherry-error.log

THEN access the general settings area again and paste any errors you see?

2025/01/24 11:04:17 [error] 580#580: *2553 FastCGI sent in stderr: “PHP message: PHP Fatal error: Uncaught mysqli_sql_exception: Duplicate entry ‘G_LAST_CURRENT_VERSION’ for key ‘PRIMARY’ in /usr/share/bluecherry/www/lib/lib.php:235
Stack trace:
#0 /usr/share/bluecherry/www/lib/lib.php(235): mysqli_real_query()
#1 /usr/share/bluecherry/www/lib/lib.php(266): database->query()
#2 /usr/share/bluecherry/www/lib/lib.php(1055): data::query()
#3 /usr/share/bluecherry/www/template/main_admin.php(206): softwareVersion->__construct()
#4 /usr/share/bluecherry/www/lib/View.php(67): include(‘…’)
#5 /usr/share/bluecherry/www/lib/Controller.php(90): View->render()
#6 /usr/share/bluecherry/www/lib/Controller.php(148): Controller->getStartView()
#7 /usr/share/bluecherry/www/lib/Route.php(75): Controller->start()
#8 /usr/share/bluecherry/www/index.php(16): Route->start()
#9 {main}
thrown in /usr/share/bluecherry/www/lib/lib.php on line 235” while reading response header from upstream, client: 172.20.40.115, server: , request: “GET / HTTP/1.1”, upstream: “fastcgi://unix:/etc/alternatives/php-fpm.sock:”, host: “debian12-bluecherry:7001”, referrer: “https://debian12-bluecherry:7001/login
2025/01/24 11:04:27 [error] 580#580: *2555 FastCGI sent in stderr: “PHP message: PHP Fatal error: Uncaught TypeError: Unsupported operand types: string / int in /usr/share/bluecherry/www/template/ajax/general.php:59
Stack trace:
#0 /usr/share/bluecherry/www/lib/View.php(67): include()
#1 /usr/share/bluecherry/www/lib/Controller.php(58): View->render()
#2 /usr/share/bluecherry/www/lib/Controller.php(148): Controller->getStartView()
#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/template/ajax/general.php on line 59” while reading response header from upstream, client: 172.20.40.115, server: , request: “GET /general HTTP/1.1”, upstream: “fastcgi://unix:/etc/alternatives/php-fpm.sock:”, host: “debian12-bluecherry:7001”, referrer: “https://debian12-bluecherry:7001/

I can’t replicate this on a clean install, but I suspect this should resolve it:

edit line 59 of /usr/share/bluecherry/www/template/ajax/general.php

OLD:

                    <input class="form-control" type='text' name='G_MAX_RECORD_AGE' value='<?php if (isset($global_settings->data['G_MAX_RECORD_AGE'])) { echo $global_settings->data['G_MAX_RECORD_AGE'] / (60 * 60 * 24); } ?>'

NEW

 <input class="form-control" type='text' name='G_MAX_RECORD_AGE' value='<?php echo !empty($global_settings->data['G_MAX_RECORD_AGE']) ? intval($global_settings->data['G_MAX_RECORD_AGE']) / (60 * 60 * 24) : ''; ?>' />

Changing line 59 in /usr/share/bluecherry/www/template/ajax/general.php to the text you listed resolved the issue.

Is that code modification a new change subsequent to V3.1.8 being released or did it exist in the releases prior to V3.1.8? I ask because the general page used to work fine in the web console when I initially installed V3, but then stopped working about 3 or 4 release updates ago. If that new code line was already in the 3.1.8 update, then the update did not apply itself correctly on any of my servers.

This has only been reported in the past few releases. Frankly, I’m not sure why. The MAX_RECORD_AGE has always been an entry in the database.