This section describes the steps to upgrade Feng Office to newer versions.
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:
define('DB_ADAPTER', 'mysqli');
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.
php FENG_ROOT/public/upgrade/console.php
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
my.domain.com/fengoffice/public/upgrade
and run the upgrade to the latest version available.
cache/
folder'your domain url'/'your_feng_root'/
and remember to delete the cache from your browser (CTRL + F5 in Windows and CMD + R in Mac)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
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
Important notes:
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)
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:
'TABLE_PREFIX
' value to 'fo_
' within the config.php
file inside the config/
foldercache/
folder.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
my.domain.com/fengoffice/public/upgrade
and run the upgrade to the latest version available.
*/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.