Upgrade FreePBX 15.0.23 to FreePBX 16

When I check for the requirements to upgrade, the reply is as follow…

Your PHP version of 7.2.34-28+ubuntu20.04.1+deb.sury.org+1 is NOT supported. 
You must have a version higher than or equal to 7.4 

When I check för PHP version, it responds with 7.4, as expected.

[email protected]:~$ php --version
PHP 7.4.28 (cli) (built: Feb 17 2022 16:06:35) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.28, Copyright (c), by Zend Technologies

I’m stuck on this error message after trying to upgrade PHP the other day.

[email protected]:~$ sudo fwconsole reload
Error: Undefined class constant 'MYSQL_ATTR_INIT_COMMAND' in file /var/www/html/admin/libraries/BMO/Database.class.php on line 127
Stack trace:
  1. Error->() /var/www/html/admin/libraries/BMO/Database.class.php:127
  2. FreePBX\Database->__construct() /var/www/html/admin/libraries/BMO/FreePBX.class.php:71
  3. FreePBX->__construct() /var/www/html/admin/bootstrap.php:144
  4. require_once() /etc/freepbx.conf:10
  5. include_once() /var/lib/asterisk/bin/fwconsole:1

OK, so my question is, how do I proceed? Where do I go from here…?

The upgrade script of the freePBX web gui will only work with original freePBX distro installs.

I don’t get it!? Why is it there if I can’t use it…?

" You must have a version higher than or equal to 7.4 " (PHP)

Where’s the logic!? Or, there isn’t any…? Just an annoying and time consuming teaser…!? Thank you for helping me!


How did you install freePBX? If you installed it manually on e.g. Ubuntu, or if you installed packages from other repositories, the upgrade script CANNOT work.

We tried Redhat, but that was a messy experience…
We use Ubuntu and installed from various guides from Internet. At the time I made three installs. Redhat + Ubunto 18.04 and Ubuntu 20.04.
I’m using Ubuntu 20.04.

OK, so how do I upgrade if I can’t do it from within the software?

I am just a regular user…
You might have to wait until somebody figures it out and posts a guide somewhere.
FreePBX 16 is a major upgrade because of php 7.4 (from 5.6 I think).

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.