Freepbx 13 and PHP 7.0 / Mariadb on Debian Stretch

I am attempting to install FreePBX 13 with PHP 7.0 on a armv5tel machine running Debian Stretch. I know this is not supported but I cannot use PHP 5.6 unless I use Jessie (which is EOL next June) or compile from source. The surey auxiliary PHP 5.6 repository does not support armel architectures and FreePBX 14 and 15 are not options because node support for armel architectures stopped before version 4.

I have successfully compiled Asterisk 16, have a working mariadb-odbc-connector (compiled from source) but during FreePbx installation I see the following errors:

[email protected]:/usr/src/freepbx# ./install -n
PHP Warning:  Declaration of FreePBX\Install\FreePBXHelpCommand::setCommand(FreePBX\Install\FreePBXInstallCommand $command) should be compatible with Symfony\Component\Console\Command\HelpCommand::setCommand(Symfony\Component\Console\Command\Command $command) in /usr/src/freepbx/installlib/installhelpcommand.class.php on line 15
Assuming you are Database Root
Checking if SELinux is enabled...Its not (good)!
Reading /etc/asterisk/asterisk.conf...Done
Checking if Asterisk is running and we can talk to it as the 'asterisk' user...Error!
Could not determine Asterisk version (got: Asterisk 16.99.99). Please report this.
Done
Preliminary checks done. Starting FreePBX Installation
Checking if this is a new install...Yes (No /etc/freepbx.conf file detected)
Database Root installation checking credentials and permissions..Connected!
Initializing FreePBX Settings
Finished initalizing settings
Copying files (this may take a bit)....
 1300/5885 [======>---------------------]  22%/etc/asterisk/modules.conf has been changed from the original version.
/etc/asterisk/cdr_adaptive_odbc.conf has been changed from the original version.
 5885/5885 [============================] 100%
Done
bin is: /var/lib/asterisk/bin
sbin is: /usr/sbin
Finishing up directory processes...Done!
Running variable replacement...Done
Creating missing #include files...Done
Setting up Asterisk Manager Connection...Done
Running through upgrades...
Checking for upgrades..
No further upgrades necessary
Finished upgrades
Setting FreePBX version to 13.0.197.14...Done
Writing out /etc/amportal.conf...Done
Writing out /etc/freepbx.conf...Done
Whoops\Exception\ErrorException: Methods with the same name as their class will not be constructors in a future version of PHP; modulelist has a deprecated constructor in file /var/www/html/admin/libraries/modulelist.class.php on line 3
Stack trace:
  1. Whoops\Exception\ErrorException->() /var/www/html/admin/libraries/modulelist.class.php:3
  2. Whoops\Run->handleError() /var/www/html/admin/functions.inc.php:189
  3. include() /var/www/html/admin/functions.inc.php:189
  4. fpbx_framework_autoloader() :0
  5. spl_autoload_call() /var/www/html/admin/libraries/modulefunctions.class.php:645
  6. module_functions->getinfo() /var/www/html/admin/libraries/utility.functions.php:1372
  7. _bootstrap_parse_hooks() /var/www/html/admin/libraries/utility.functions.php:1348
  8. bootstrap_include_hooks() /var/www/html/admin/bootstrap.php:308
  9. require_once() /etc/freepbx.conf:9
 10. include_once() /var/lib/asterisk/bin/fwconsole:12
Installing framework...
Whoops\Exception\ErrorException: Methods with the same name as their class will not be constructors in a future version of PHP; modulelist has a deprecated constructor in file /var/www/html/admin/libraries/modulelist.class.php on line 3
Stack trace:
  1. Whoops\Exception\ErrorException->() /var/www/html/admin/libraries/modulelist.class.php:3
  2. Whoops\Run->handleError() /var/www/html/admin/functions.inc.php:189
  3. include() /var/www/html/admin/functions.inc.php:189
  4. fpbx_framework_autoloader() :0
  5. spl_autoload_call() /var/www/html/admin/libraries/modulefunctions.class.php:645
  6. module_functions->getinfo() /var/www/html/admin/libraries/utility.functions.php:1372
  7. _bootstrap_parse_hooks() /var/www/html/admin/libraries/utility.functions.php:1348
  8. bootstrap_include_hooks() /var/www/html/admin/bootstrap.php:308
  9. require_once() /etc/freepbx.conf:9
 10. include_once() /var/lib/asterisk/bin/fwconsole:12
Done
Building Packaged Scripts...Done
Trusting FreePBX...Trusted
Installing all modules...Whoops\Exception\ErrorException: Methods with the same name as their class will not be constructors in a future version of PHP; modulelist has a deprecated constructor in file /var/www/html/admin/libraries/modulelist.class.php on line 3
Stack trace:
  1. Whoops\Exception\ErrorException->() /var/www/html/admin/libraries/modulelist.class.php:3
  2. Whoops\Run->handleError() /var/www/html/admin/functions.inc.php:189
  3. include() /var/www/html/admin/functions.inc.php:189
  4. fpbx_framework_autoloader() :0
  5. spl_autoload_call() /var/www/html/admin/libraries/modulefunctions.class.php:645
  6. module_functions->getinfo() /var/www/html/admin/libraries/utility.functions.php:1372
  7. _bootstrap_parse_hooks() /var/www/html/admin/libraries/utility.functions.php:1348
  8. bootstrap_include_hooks() /var/www/html/admin/bootstrap.php:308
  9. require_once() /etc/freepbx.conf:9
 10. include_once() /var/lib/asterisk/bin/fwconsole:12
Whoops\Exception\ErrorException: Methods with the same name as their class will not be constructors in a future version of PHP; modulelist has a deprecated constructor in file /var/www/html/admin/libraries/modulelist.class.php on line 3
Stack trace:
  1. Whoops\Exception\ErrorException->() /var/www/html/admin/libraries/modulelist.class.php:3
  2. Whoops\Run->handleError() /var/www/html/admin/functions.inc.php:189
  3. include() /var/www/html/admin/functions.inc.php:189
  4. fpbx_framework_autoloader() :0
  5. spl_autoload_call() /var/www/html/admin/libraries/modulefunctions.class.php:645
  6. module_functions->getinfo() /var/www/html/admin/libraries/utility.functions.php:1372
  7. _bootstrap_parse_hooks() /var/www/html/admin/libraries/utility.functions.php:1348
  8. bootstrap_include_hooks() /var/www/html/admin/bootstrap.php:308
  9. require_once() /etc/freepbx.conf:9
 10. include_once() /var/lib/asterisk/bin/fwconsole:12
Done installing modules
Whoops\Exception\ErrorException: Methods with the same name as their class will not be constructors in a future version of PHP; modulelist has a deprecated constructor in file /var/www/html/admin/libraries/modulelist.class.php on line 3
Stack trace:
  1. Whoops\Exception\ErrorException->() /var/www/html/admin/libraries/modulelist.class.php:3
  2. Whoops\Run->handleError() /var/www/html/admin/functions.inc.php:189
  3. include() /var/www/html/admin/functions.inc.php:189
  4. fpbx_framework_autoloader() :0
  5. spl_autoload_call() /var/www/html/admin/libraries/modulefunctions.class.php:645
  6. module_functions->getinfo() /var/www/html/admin/libraries/utility.functions.php:1372
  7. _bootstrap_parse_hooks() /var/www/html/admin/libraries/utility.functions.php:1348
  8. bootstrap_include_hooks() /var/www/html/admin/bootstrap.php:308
  9. require_once() /etc/freepbx.conf:9
 10. include_once() /var/lib/asterisk/bin/fwconsole:12
Generating default configurations...
sudo: unable to execute /usr/sbin/fwconsole: Permission denied
Finished generating default configurations
You have successfully installed FreePBX

Even though it says I have successfully installed FreePBX, it of course does not run.

Hoping someone out there would have suggestions to try to make this non-standard installation work?

For FPBX 13 maybe roll your own php to suit (5.6 should work) from

https://www.php.net/releases/

What is the ownership and permissions of fwconsole?

Thanks for the tip dicko, did a fwconsole chown then turned off PHP error logging per https://wiki.freepbx.org/display/FOP/Turning+off+FreePBX+Error+Handling.

That at least got me to the admin credentials creation screen. Entered my credentials and got to a basically unpopulated Freepbx home screen (but without Dashboard). Had to load all modules from the command line, had a couple hickups here and there but eventually got it all to load error free. After a reboot, asterisk wasn’t starting so added ‘fwconsole start’ to the end of /etc/rc.local. Also had to start chan_sip.so manually as it wasn’t being loaded originally.

Pleased however FreePBX 13 appears to load under Debian Stretch with mariadb (instead of mysql), PHP 7.0 (vs. 5.6) and Asterisk 17 (compiled from the master branch and fake versioning to 16.99). Very much aware this is completely unsupported and could blow up at any time, nonetheless, happy I got this far:)

1 Like

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