You are here: PHP Products > ChartBuilder > Upgrading ChartBuilder

ChartBuilder for PHP/MySQL

Upgrading ChartBuilder

Version 4.0 and higher for ChartBuilder employ a MySQL database of your choice to store your chart configurations, rather than the charts.xml file in previous versions. As a result, when upgrading from an earlier version you will need to decide on a database to store the configuration, and at the end run a migration script one time.

Step 1: Download and extract the newest version

Download the new version from the OpenGate customer portal.

Step 2a (optional): Test in a Sandbox

Copy your existing ChartBuilder directory to a new directory on your server to function as an upgrade sandbox. Replace all the files in your ChartBuilder directory with the files in the latest ChartBuilder download, except databases.php and charts.xml. Test that ChartBuilder is working as expected before upgrading your production folder in step 2b.

Step 2b: Replace files in your ChartBuilder Directory

Replace all the files in your ChartBuilder directory with the files in the latest ChartBuilder download, except databases.php and charts.xml.  Leave these two files "as-is" to ensure you don't lose any of your work.


One-Time Steps for Upgrading to Version 4.0 or higher

Step 3: Define a MySQL configuration database.

If you are upgrading from ChartBuilder 3.8 or earlier, open databases.php and add the following line:

define("ConfigDB", "ChartBuilderAdmin");

Change "ChartBuilderAdmin" in the line to the display name of one of your database connections where you want to include the six ChartBuilder configuration tables. This can be one of your existing databases you use for analysis, or a separate database that doesn't store chart data.

Step 4: Migrate Chart Definitions

Open yoursiteurl/ogs/migrate.php to create the MySQL configuration tables and migrate your chart definitions from the xml file to the MySQL tables. This is a one-time activity. Once complete, your existing and new chart definitions will exist in the MySQL config database.