Close

October 5, 2017

New Ubuntu Server Install/ FengOffice PHP 7 How-To

We had an older version of FengOffice that needed to be ported to a new Ubuntu server having PHP7. So with the older copy, we followed the update instructions and upgraded to version 3.5.1.5 without any issues.

We then proceeded to migrate to the new server that had a fresh install of Ubuntu LTS (16.04.3 LTS) and the basic LAMP packages.

Vanilla FengOffice 3.5.1.5 is NOT Php7 compatible, but with a bit of coding we were able to stitch it up to work.

Shout out to user “VL” on the FengOffice Forum, for getting the MySQLI library working!

1.) Update your install to 3.5.1.5
2.) Backup all of your PHP files.
3.) Make sure you have MBSTRING installed for PHP7.
4.) Copy the patch files (http://silvatechsolutions.com/fengphp7patches.zip) over your feng install directory
5.) Change your config.php to use the new mysqli data adapter:
define(‘DB_ADAPTER’, ‘mysqli’);

Note that we do not use a significant amount of the features in FengOffice, so there are undoubtedly a lot of other things to be fixed for PHP7. Most that we found were “continues” that were in the middle of functions not within a loop/switch, which is a big no-no in PHP7 (we used a return in a function).


Fatal error: Uncaught Error: [] operator not supported for strings in /home/silvatec/public_html/wp-content/themes/layerswp/core/helpers/post.php:62 Stack trace: #0 /home/silvatec/public_html/wp-content/themes/layerswp/partials/content-single.php(81): layers_post_meta(4022) #1 /home/silvatec/public_html/wp-includes/template.php(690): require('/home/silvatec/...') #2 /home/silvatec/public_html/wp-includes/template.php(647): load_template('/home/silvatec/...', false) #3 /home/silvatec/public_html/wp-includes/general-template.php(167): locate_template(Array, true, false) #4 /home/silvatec/public_html/wp-content/themes/layerswp/single.php(20): get_template_part('partials/conten...', 'single') #5 /home/silvatec/public_html/wp-includes/template-loader.php(74): include('/home/silvatec/...') #6 /home/silvatec/public_html/wp-blog-header.php(19): require_once('/home/silvatec/...') #7 /home/silvatec/public_html/index.php(17): require('/home/silvatec/...') #8 {main} thrown in /home/silvatec/public_html/wp-content/themes/layerswp/core/helpers/post.php on line 62