Update myDBR
Regularly updating myDBR ensures you have access to the latest features, security enhancements, and bug fixes. When a new version is released, an update notification is displayed within the application (requires an internet connection). We recommend applying updates promptly to maintain optimal performance.
Automatic Updates via the Web Interface
The simplest way to update is through the built-in automatic updater. myDBR periodically checks for new versions and notifies administrators on the main screen. To perform an update, navigate to Admin Tools -> About / Update and click Update now....
Tip: If your license has expired and you cannot access Admin Tools, click the myDBR logo in the top-left corner to access the About / Update dialog.
During the process, myDBR automatically replaces the application files and applies any required database schema changes. All reports, user configurations, and customizations stored in the user/ directory are preserved.
The updater requires outbound access to www.mydbr.com via ports 80 (HTTP) and 443 (HTTPS). If your server is behind a firewall, configure the proxy settings in the Environment settings. Ensure the php_curl extension is installed for reliable proxy communication.
Manual Updates and PHP Version Changes
A manual update is required if your server lacks internet access or if you are changing your PHP version (which may require a different SourceGuardian or ionCube loader).
Manual Update Steps:
- Update the required PHP extensions (loaders and ChartDirector) in your PHP installation if necessary.
- Back up your myDBR configuration file (
mydbr_config.php) and theuser/directory. - Download the latest myDBR ZIP package from the download page.
- Replace your existing myDBR application files with the contents of the new ZIP package.
- Restore your
mydbr_config.phpand theuser/directory. - Access myDBR via your web browser to complete the database update via the update wizard.
All existing reports and data remain intact during this process.
Automating the Update Process
The update process can be fully automated using scripts.
Retrieving the Current Version
To retrieve the current myDBR version and build information in JSON format, use the following command:
curl "https://yourserver.com/mydbr/index.php?a=version&export=json"
The response provides the version and build:
{
"version": "4.3.2",
"build": "2534"
}
This endpoint also supports JSONP by adding a callback parameter. The response will include a key field containing the last 10 characters of your license, which can be used to verify license validity in your scripts.
Executing an Automated Update
Scripted updates use HTTP Basic Authentication. By default, myDBR includes a mydbr_updater user for this purpose (configurable in defaults.php). To use this feature, add the mydbr_updater user to your myDBR installation. This user is restricted to update operations and cannot be used for standard logins.
Run the following command to initiate an update (replace credentials and URL accordingly):
curl -H "X-MYDBR-AUTH: 1" -u mydbr_updater:password "https://yourserver.com/mydbr/install/index.php?controller=update&action=update"
A successful update returns a JSON object with version details:
{
"host": "yourserver.com",
"expiration": "2025-12-22",
"version": {
"before_update": "4.3.2/2534",
"after_update": "4.4.0/2697"
}
}
If the update fails, an error field is included with the failure reason.
Automated License Management
For environments with multiple myDBR installations, you can designate one instance as a License Server to manage and distribute licenses centrally.
Configuring the License Server
- Enable the license server role in
user/defaults.phpon the primary instance:$mydbr_defaults['license_server']['is_server'] = true; - Create a dedicated local user (default:
license_checker) on the license server. - Add all purchased licenses to the license server's Licenses tab.
Configuring Client Instances
On each client server, specify the URL of the primary license server in user/defaults.php:
$mydbr_defaults['license_server']['server_url'] = 'https://your-license-server.com/mydbr';
Distributing Licenses
To trigger a license update on a client server, use the following command:
curl -H "X-MYDBR-AUTH: 1" -u license_checker:password "https://client-server.com/mydbr/index.php?a=license_service&update=1"
A successful retrieval returns {"status":"ok"}. Errors are returned in a success: "error" object containing an array of specific failure messages.
Managing Large-Scale Installations
For environments with numerous myDBR instances, we recommend automating the update and license management processes. You can utilize scheduled reports on client instances to request new licenses or deploy a centralized management report to oversee distribution and updates across your entire infrastructure.
Centralized License and Update Management
The following example demonstrates a management report designed to run on a primary License Server. This report monitors the version and license status of multiple client servers and allows administrators to initiate remote updates and license distribution from a single interface.
Preparation
- Client Configuration: Add the
mydbr_updaterandlicense_checkerusers to all client servers (default names are defined in$mydbr_defaults['updater_users']and$mydbr_defaults['license_users']). - Server Configuration: Add the
license_checkeruser to the primary License Server (defined in client servers via$mydbr_defaults['license_server']['username']and$mydbr_defaults['license_server']['password']). - Connectivity: Define the
server_urlfor the License Server on each client instance. - Role Activation: Enable the
is_serverrole on the primary License Server by adding$mydbr_defaults['license_server']['is_server'] = true;to its configuration. - License Import: Upload all relevant licenses to the primary License Server.
- Report Deployment: Install the monitoring report (detailed below) on the License Server.
Workflow Summary
- Version Updates: The management report compares the version and build of each client against the latest available. Administrators can click a version indicator to trigger a remote update via JSONP and Basic Authentication.
- License Synchronization: The report identifies clients with outdated or missing licenses. A single click initiates a license refresh, where the client server securely retrieves its assigned license from the management server.
Management Stored Procedure
create procedure sp_DBR_update_license(
inVersionBuild varchar(20)
)
begin
select 'dbr.css', '
.license_status { text-align: center; }
.license_update, .version_update {
cursor: pointer;
background-color: green;
padding: 3px 6px;
border-radius: 6px;
color: white;
}
.red { background-color: red; }
.version { text-align: center; }
.version .ajaxspin { margin: auto; }
';
select 'dbr.colclass', 'host', 'host';
select 'dbr.colclass', 'license_status', 'license_status';
select 'dbr.colclass', 'version', 'version';
select 'dbr.colclass', 'errors', 'errors';
select 'dbr.html5data', 'host', 'license_key', 'license-key';
select 'dbr.html5data', 'host', 'license_host', 'license-host';
select 'dbr.html5data', 'version', 'version_build', 'version';
select
concat('https://', host) as 'Installation URL[host]',
l.host as 'license_host',
l.license_key,
'' as 'Version[version]',
'' as 'License OK[license_status]',
inVersionBuild as 'version_build',
'' as '[errors]'
from mydbr_licenses l
where host != 'mylicenseserver.mydomain.com';
select 'dbr.javascript',
"$(document).ready(function() {
// Retrieve installed versions and license hashes
$('.host').each( function() {
var $tr = $(this).closest('tr'),
url = $(this).text()+'/index.php?a=version&export=jsonp&callback=?';
$.ajax({
url: url,
dataType: 'jsonp',
success: function(v) {
var $v, vb, key_ok = (v.key == $tr.find('.host').attr('data-license-key').substr(-10));
$v = $tr.find('.version');
vb = v.version+'/'+v.build;
if ($v.data('version') !== vb) {
$v.html('<span class=\"version_update\">'+vb+'</span>');
} else {
$v.text(v.version+'/'+v.build);
}
if (key_ok) {
$tr.find('.license_status').text('OK');
} else {
$tr.find('.license_status').html('<span class=\"license_update\">Newer license available</span>');
}
},
error: function(e, status, error) {
$tr.find('.version').text('Unknown');
$tr.find('.errors').text(e.status+'/'+error);
}
});
});
// Initiate remote license update
$(document).on('click', '.license_update', function() {
var url, $tr = $(this).closest('tr');
url=$tr.find('.host').text()+'/index.php?a=license_service&update=1&callback=?';
$.ajax({
url: url,
beforeSend: function(xhr) {
xhr.withCredentials = true;
xhr.setRequestHeader('X-MYDBR-AUTH', '1');
xhr.setRequestHeader('Authorization', 'Basic ' + btoa('license_checker:password'));
},
dataType: 'jsonp',
success: function(r) {
if (r.status=='ok') {
$tr.find('.license_status').text('OK');
} else {
$tr.find('.license_status .license_update').addClass('red');
var e = r.errors.map(function(err){ return '<div>'+err+'</div>'; }).join('');
$tr.find('.errors').html(e);
}
},
error: function(e, status, error) {
$tr.find('.errors').text(e.status+'/'+error);
}
});
});
// Initiate remote application update
$(document).on('click', '.version_update', function() {
if (confirm('Execute remote update?')) {
var url, $tr = $(this).closest('tr'), $v = $tr.find('.version');
url=$tr.find('.host').text()+'/install/index.php?controller=update&action=update&callback=?';
$v.html('<div class=\"ajaxspin\"></div>');
$.ajax({
url: url,
beforeSend: function(xhr) {
xhr.withCredentials = true;
xhr.setRequestHeader('X-MYDBR-AUTH', '1');
xhr.setRequestHeader('Authorization', 'Basic ' + btoa('mydbr_updater:password'));
},
dataType: 'jsonp',
success: function(r) {
if (r.error) {
$v.text(r.error);
} else {
$v.text(r.version.after_update || 'Unknown error');
}
},
error: function(e, status, error) {
$tr.find('.errors').text(e.status+'/'+error);
}
});
}
});
});
";
end