This section describes the steps to upgrade Feng Office to newer versions.

Important note for upgrading to 3.7 and above

Feng Office 3.7 introduced PHP 7 support.

This change required a lot of changes in the code and in the configuration.

One of the notable changes is that the Mysql adaptor used now is mysqli.

Hence, upgrading to a version 3.7 or higher, from a version prior to 3.7 requires the following procedure:

Prior to running the upgrade:

  1. Edit the config/config.php file
  2. Replace the adapter from 'mysql' to 'mysqli':
  define('DB_ADAPTER', 'mysqli');
  1. Resume as you would normally upgrade

Upgrading a 3.X or 2.X version

In order to upgrade Feng Office (from a 2.X or later), please do as follows.

(If you are still on version 1.X, look section Upgrading from 1.X to 2.X.

  1. Backup everything from your installation in case anything goes wrong and you have to rollback:
    1. filesystem (all the files and folders)
    2. database
  2. Copy, paste and replace the new version files on top of the folders and documents from your actual installation.
  3. Make sure your folder permissions are correct (upload, config, cache and tmp folders with 775 or 777 permissions)
  4. You now have to run the upgrade script.You may do it through one of the following methods:
    1. Starting with version 3.0, you can run the following command in your console (which is faster and better):
      php FENG_ROOT/public/upgrade/console.php
    2. Until version 2.7, run the following command in your console:
      php FENG_ROOT/public/upgrade/console.php [version_from] [version_to]

      For example:

      php FENG_ROOT/public/upgrade/console.php 2.6 2.7.1
    3. Or do it from your browser going to:
      my.domain.com/fengoffice/public/upgrade

      and run the upgrade to the latest version available.

  5. While sometimes this does work automatically, it is recommended that you always run and update the plugins as well
  6. Delete the autoloader.php file within the cache/ folder
  7. Once everything is ready, go to 'your domain url'/'your_feng_root'/ and remember to delete the cache from your browser (CTRL + F5 in Windows and CMD + R in Mac)

Plugins Installation and Updates

With the new version, you may have new plugins to install and upgrade as well.In order to do this there are two ways of doing it: command line or graphic user interface (GUI)

- Access the installation folder (or do it from wherever you want through absolute reference of course)

- Run the following commands:

php [FENG_ROOT]/public/install/plugin-console.php list
php [FENG_ROOT]/public/install/plugin-console.php update_all

That is it! Your plugins are updated.

Note: In case you experience a “memory exhausted error” in between, you may try allocating more memory for this process, as shown below:

php -d memory_limit=512M [FENG_ROOT]/public/install/plugin-console.php update_all

Command Line Explanations:

In case you are curious to know of the other possibilites, please look below:

Listing all possibilities

php [FENG_ROOT]/public/install/plugin-console.php

List all of the plugins with their state, version and installed version:

php [FENG_ROOT]/public/install/plugin-console.php list

Install a plugin:

php [FENG_ROOT]/public/install/plugin-console.php install [plugin_name]

Activate a plugin (for the time being, this is compulsory to do after you install one!):

php [FENG_ROOT]/public/install/plugin-console.php activate [plugin_name]

Update a plugin:

php [FENG_ROOT]/public/install/plugin-console.php update [plugin_name]

Update all of the installed plugins:

php [FENG_ROOT]/public/install/plugin-console.php update_all

Examples:

Gantt Installation (this plugin is currently available for the Professional Edition only):

php /www/acme/public/install/plugin-console.php install gantt

Gantt Activation (this plugin is currently available for the Professional Edition only):

php /www/acme/public/install/plugin-console.php activate gantt

Gantt Update (this plugin is currently available for the Professional Edition only):

php /www/acme/public/install/plugin-console.php update gantt

  1. Edit the config.php file within the config/ folder and add the following line anywhere in the document (within the Php tags of course): define('PLUGIN_MANAGER', true);
  2. Log in to your Feng Office installation, click on your name (top right corner)and access the ‘Administration’ and then the ‘Plugin Manager’
  3. Install and then activate (or upgrade) the plugins you should consider useful and necessary
  4. Change the new constant in the config.php file to false if you wish to

Important notes:

  1. For the time being, after you upgrade your Feng Office installation, you must manually update your plugins as well (we suggest using the command line).Eventually this will be done automatically, but not yet.
  2. Delete the cache from your browser(CTRL+F5 in Windows/Linux and CMD+R in Mac)

Upgrading from Community Edition to Professional Edition

1) Backup everything from your installation in case anything goes wrong and you have to rollback: - filesystem (all the files and folders) - database

2) Overwrite your CE folder with the package sent by Feng Office. You will notice that the folder “plugins” will have more content.

3) Run the core update script:

php FENG_ROOT/public/upgrade/console.php

4) Run the plugins upgrade scripts:

php [FENG_ROOT]/public/install/plugin-console.php list
php [FENG_ROOT]/public/install/plugin-console.php update_all

5) At this point you will have your CE edition updated to the latest version, to add the features of the Professional/Enterprise edition you need to install the new plugins. It can be done in two ways:

a) Enable the plugin administrator in the Settings section

- Add the following constant in the config/config.php file

define(‘PLUGIN_MANAGER’, true);

- Go to Settings → Plugins

- Install and activate the plugins you want to use

- After finishing installing new plugins, set the PLUGIN_MANAGER constant to false or remove it from the config/config.php file

b) Install and activate each plugin using the command line

- For each plugin you want to install run the following command ( note that [plugin_name] is the name of the folder of the plugin inside the “plugins” directory)

 php [FENG_ROOT]/public/install/plugin-console.php install_activate [plugin_name]

If you have any questions, please get in touch with a Feng Office Executive for a quote (contact@fengoffice.com)

Upgrading from 1.X to 2.X or later

In case you do not count with the latest 1.7.X version available, you should first make sure you upgrade your version to the 1.7.5 at least (backing up everything before, of course).

Then, you have to follow these steps:

  1. Backup everything from your installation:
    1. filesystem
    2. documents
    3. and database.
    4. In case anything goes wrong and you have to rollback.
  2. Delete all of the folders and files (except the .htaccess and php.ini to keep your previous settings) within your Feng Office root except for the following folders:
    1. cache
    2. config
    3. tmp
    4. upload
  3. Copy all of the new folders of the new version into your Feng Office root folder, except the ones you have kept on step 2.
  4. Change the 'TABLE_PREFIX' value to 'fo_' within the config.php file inside the config/ folder
  5. JavaScript compression and cache are not supported in Feng Office 2.X yet, so remove or comment those lines as well.
  6. Delete the autoloader.php file within the cache/ folder.
  7. You now have to run the first script to upgrade the version. You may do it through one of the following methods:
    1. Run the following command in your console - which is faster and better -:
      php FENG_ROOT/public/upgrade/console.php [version_from] [version_to]

      For example:

      php FENG_ROOT/public/upgrade/console.php 1.7.5 2.2.1
    2. Or do it from your browser going to:
      my.domain.com/fengoffice/public/upgrade

      and run the upgrade to the latest version available.

  8. After performing the upgrade, you have to run the complete_migration.php script. As you may have to run it several times depending on the amount of data you have, we suggest adding a line to the crontab as following:
*/10 * * * * php FENG_ROOT/public/upgrade/complete_migration.php 2000 >> /root/feng_upgrade_log.log

This means that 2000 objects will be processed every 10 minutes. In some cases, with clients of ours with years of data, this has taken up to 30 hours of running, so you have to be patient :)

You ought to check the log file, and once it is over, delete that line from your crontab.

After running the upgrade script, remember to update the plugins as well, otherwise you may find failures within the system.

Once everything is ready, remember to delete the cache from your browser (CTRL + F5 in Windows and CMD + R in Mac)

Note: This process will leave your database with both old and new tables. You may delete the old ones if you want to, but we do not suggest doing so yet in case the migration missed something and we then release a script to solve the issues.