Upgrade from 13 to 14 failing with Module / php error

Took the dive and tried to upgrade from a clean running V13 to V14 using the upgrade script. The “pre-upgrade” went fine, then it rebooted. From there the upgrade did not occur and PBX was left in a non-running form (thankful for image based backups!!). I believe the error starts from the log file shown about half way down and says:

“Module compiled with module API=20090626
PHP compiled with module API=20131226
These options need to match”

Thoughts and direction is appreciated

The entire log error log displayed upon reboot is as follows:
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ ┃
┃ Sangoma 6 to 7 Upgrade Tool ┃
┃ ┃
┃ Distro Upgrade - Version 1707-12.sng7 ┃
┃ Build Date: 2017-08-11 ┃
┃ ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

Checking prerequsites…
Checking bitsize of machine [ :heavy_check_mark: ] - x86_64
Checking available disk space [ :heavy_check_mark: ] - 7G Available
Checking for outdated system [ :heavy_check_mark: ] - No pending updates.
Checking for HA Setup [ :heavy_check_mark: ] - Not a HA system
All prerequsites passed!

Are you ready to upgrade your machine to SNG7? This process requires
two reboots, and will download approximately 200mb of files before
starting. There will be no interruption to service until this machine
is rebooted.

Download files required for upgrade [Yn]? y
######### Starting setup upgrade on Sat Aug 12 08:26:03 EDT 2017 #########
######### Creating upgrade repofile #########
######### Installing needed packages #########
######### Running preupgrade #########
######### Running upgrade-tool #########
######### Downloading sangoma-release rpm #########
######### Updating packages.list #########
######### Verified sangoma-release in package.list #########
######### Reboot to finish this stage of the upgrade #########
######### Finished setup upgrade on Sat Aug 12 08:32:59 EDT 2017 #########
Preparations complete!

Please reboot your machine when convenient. This machine will install all the new
and upgraded packages, and then reboot for a second time automatically. After the
second reboot, it will then continue the upgrade process automatically. When the
upgrade is complete, you will be presented with a standard login prompt.
You have new mail in /var/spool/mail/root
[root@XXXXXX ~]# reboot

Broadcast message from [email protected]
(/dev/pts/1) at 8:36 …

The system is going down for reboot NOW!
[root@XXXXXX ~]#
login as: root
[email protected]’s password:
Last login: Sat Aug 12 08:25:05 2017 from xxx.xxx.xxx.xxx
PHP Warning: PHP Startup: digium_register: Unable to initialize module
Module compiled with module API=20090626
PHP compiled with module API=20131226
These options need to match
in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library ‘/usr/lib64/php/modules/mysql.so’ - libmysqlclien t.so.16: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library ‘/usr/lib64/php/modules/mysqli.so’ - libmysqlclie nt.so.16: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library ‘/usr/lib64/php/modules/pdo_mysql.so’ - libmysqlc lient.so.16: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library ‘/usr/lib64/php/modules/wddx.so’ - /usr/lib64/php /modules/wddx.so: undefined symbol: php_XML_SetUserData in Unknown on line 0
PHP Fatal error: Incompatible file format: The encoded file has format major ID 4, whereas the Loader exp ects 7 in /var/www/html/admin/modules/sysadmin/agi-bin/LoadLicenseIfExists.php on line 0
Whoops\Exception\ErrorException: Incompatible file format: The encoded file has format major ID 4, whereas the Loader expects 7 in file /var/www/html/admin/modules/sysadmin/agi-bin/LoadLicenseIfExists.php on line 0
Stack trace:

  1. () /var/www/html/admin/modules/sysadmin/agi-bin/LoadLicenseIfExists.php:0
    PHP Warning: PHP Startup: digium_register: Unable to initialize module
    Module compiled with module API=20090626
    PHP compiled with module API=20131226
    These options need to match
    in Unknown on line 0
    PHP Warning: PHP Startup: Unable to load dynamic library ‘/usr/lib64/php/modules/mysql.so’ - libmysqlclien t.so.16: cannot open shared object file: No such file or directory in Unknown on line 0
    PHP Warning: PHP Startup: Unable to load dynamic library ‘/usr/lib64/php/modules/mysqli.so’ - libmysqlclie nt.so.16: cannot open shared object file: No such file or directory in Unknown on line 0
    PHP Warning: PHP Startup: Unable to load dynamic library ‘/usr/lib64/php/modules/pdo_mysql.so’ - libmysqlc lient.so.16: cannot open shared object file: No such file or directory in Unknown on line 0
    PHP Warning: PHP Startup: Unable to load dynamic library ‘/usr/lib64/php/modules/wddx.so’ - /usr/lib64/php /modules/wddx.so: undefined symbol: php_XML_SetUserData in Unknown on line 0
    PHP Fatal error: Incompatible file format: The encoded file has format major ID 4, whereas the Loader exp ects 7 in /var/www/html/admin/modules/sysadmin/agi-bin/LoadLicenseIfExists.php on line 0
    Whoops\Exception\ErrorException: Incompatible file format: The encoded file has format major ID 4, whereas the Loader expects 7 in file /var/www/html/admin/modules/sysadmin/agi-bin/LoadLicenseIfExists.php on line 0
    Stack trace:
  2. () /var/www/html/admin/modules/sysadmin/agi-bin/LoadLicenseIfExists.php:0

Hi!

Please follow the troubleshooting steps at the end of the wiki page…

(ie create a ticket and post the files asked for there…)

You seem to have at least 2 problems in there, some missing 64-bit MySQL/MariaDB libraries and something went wrong with the update of your commercial modules…

Good luck and have a nice day!

Nick

Also remove the digium register php module along with most of your corrupt php modules.

This also looks like the old script before it was updated yesterday and before Nicolas helped fix issues.

Please let us know the RPM version of the upgrade.

@xptpa2020 Can you run the following command for me to get the version of the distro-upgrade RPM you are using, so we know what version may be experiencing the problem.

rpm -q --qf "[%{NAME} %{VERSION}-%{RELEASE}\n]" distro-upgrade 

When running this command, we receive the following:
“package distro-upgrade is not installed”

It is a standard distro install (originally 12 then upgraded to 13)

When I tried to run the upgrade from the GUI I received the following:

“You will need to run the upgrade script manually through the CLI to completely upgrade the system https://wiki.freepbx.org/display/PPS/Upgrading+from+Distro+6

Based upon this I clicked the link, was redirected, and ran the manual script provided at said location.

@xptpa2020 So after the reboot, did the script complete as that’s unclear to me? If so my command wouldn’t work as we remove the distro-upgrade rpm, but we are adding that into a new rpm so we can identify what versions people are running. In the meantime when did you download the distro-upgrade script as that will at least get us a time frame from which we can determine the version.

Sorry for any confusion. Here is the order of steps:

  1. Have a V13 PBX I want to upgrade. That V13 PBX has all modules updated to Edge and is fully updated at the system level, running “10.13.66-21”. There are no disabled modules, but several modules not installed, as they are not needed, such as “High Availability” and “Fax Configuration Professional”.

  2. I download upgrader 13 to 14 GUI module. Ran it and it directs me to manually upgrade giving the response of: “You will need to run the upgrade script manually through the CLI to completely upgrade the system https://wiki.freepbx.org/display/PPS/Upgrading+from+Distro+6

  3. I proceed to that link and follow its instructions from a console session CLI. During that process it runs the “requirements” and passes. It says to reboot to start the upgrade process and I do. It comes back up, appears to attempt upgrade, but shows errors, primarily in php. This is detailed in the original post of this thread.

  4. The failed upgrade process rendered the PBX unable to process calls or access the GUI, so I restored the PBX from an image-level backup done right before the upgrade attempt. On that image restored (so V13 with no V14 attempt as the image was pre-upgrade attempt) I ran the command “rpm -q --qf “[%{NAME} %{VERSION}-%{RELEASE}\n]” distro-upgrade” and was presented with “package distro-upgrade is not installed”.

I hope this made things a bit more clear.

@xptpa2020 Ok, so it appears the upgrade did complete. When did you download the distro-upgrade rpm from the wiki? Also, did you open a ticket with the log output yet, as I can then get a better idea of what did and didn’t complete correctly?