Debian 9, FreePBX 14, Asterisk 16, PHP5.6 v PHP7.0 and getting them to play nicely

I’ve just upgraded my home NAS from OMV3 to OMV4 (Debian Jessie to Debian Stretch) via the OMV ISO - and took the opportunity to upgrade Asterisk15 to Asterisk16 (downloaded src and compiled) and FreePBX 13 to FreePBX 14.

FreePBX wants php5.6, and OMV/Debian 9 want php7.0 - but OMV uses nginx whereas FreePBX uses apache2 - so I managed to get everything to play nicely.

This is how to get it all to play nicely :)

All open source components (commercial stuff isn’t supported debian) should work without issue in PHP 7. PHP 5.6 is a minimum. If you find an issue with FreePBX+ PHP 7 please report it to https://issues.freepbx.org

Anecdotally, I just put up a Debian 9 /FreePBX 15 system, to get UCP working I needed to install php5.6 and set apache2 to use it, then download/icu-devel and icu Centos 7 rpm packages and use alien/dpkg -i on each one as FreePBX doesn’t like the Debian available ones. So far so good . . .

Several freepbx php scripts (including fwconsole) fail under php7.0 for me with:

[email protected]:/var/www/html/ucp/assets/js/compiled/modules# php7.0 /usr/sbin/fwconsole
Whoops\Exception\ErrorException: Methods with the same name as their class will not be constructors in a future version of PHP; dayNightObject has a deprecated constructor in file /var/www/html/admin/modules/daynight/functions.inc.php on line 9
Stack trace:

  1. Whoops\Exception\ErrorException->() /var/www/html/admin/modules/daynight/functions.inc.php:9
  2. Whoops\Run->handleError() /var/www/html/admin/bootstrap.php:362
  3. require_once() /var/www/html/admin/bootstrap.php:362
  4. require_once() /etc/freepbx.conf:9
  5. include_once() /var/lib/asterisk/bin/fwconsole:12

It runs without error under php5.6

And what dicko said above - UCP failed under php7.0 for me - and “retrieve_conf” and a variety of others.

I found that these DO work under php 7 in FreePBX 15 , it’s just the UCP that is dependent still on php 5.6 and only likes specific icu* libraries

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