Hi, I am getting this issue too, and I am using 8.1 version of php
FreePBX 15 is written for PHP 5.6 and FreePBX 16 is written for PHP 7.4.
Moved this to its own topic as the other one was 6 years old and the issue though related is not the same.
As bill mentioned you have to use a supported version of PHP. To my knowledge no PHP 8.1 work has been done by the community or staff for FreePBX. The community did most of the work for PHP 7.X. If you want 8.x support you can likely contribute your efforts.
As with any major version change there is the possibility of backward-incompatibilities. PHP 7.4 → 8.0 has a boat load: PHP: Backward Incompatible Changes - Manual
And then a few more for 8.1: PHP: Backward Incompatible Changes - Manual
In other words, there should be no expectation that it would work on PHP 8.x.
I think the PHP version that goes with the FreePBX version could be spelled out a little clearer in the documentation, though if you read through the install steps, you can see that you are installing PHP 7.4 for FreePBX 16 (ref: Installing FreePBX 16 on Debian 10.9 - FreePBX OpenSource Project - Documentation)
Currently, get it installed with php 7.x
Let’s be really honest with ourselves here. The project is right back in the same boat it was about 3-4 years ago with PHP. The major PHP version in use is going completely EOL as PHP 7.x is fully dead as of Nov. 22nd. Right now it’s security fixes only so no bug fixes, etc for 7.x.
I mean, again full honesty, the inability of this project to keep itself even remotely currently with the very things that drive the project is getting way out of hand now. This project is behind with Asterisk, PHP, Apache, Node, MySQL/Maria and I’m sure the list goes on. Hell right now the idea is to put the distro on Rocky 8 and by the time that happens Rocky 8 will have entered the 5 years of “we don’t do anything with this unless it’s a major security issue”.
I mean, I’ve had a development machine sitting here for over 6 months now and I never got straight answers about what is going to be done, what plans are, etc… Hell, I even been checking GitHub looking at the v17 code thinking I could find some breadcrumbs on what direction is being taken and all I see still in the dialplan generation code is app_macro still being called on every-fricking-where. The generate core dialplan (inbound/outbound routes, extensions, all the apps like cf-on, voicemail routing, etc) is still 100% all app_macro calls.
On top of that we’re starting to see the new Linux distros being released over the last year have really started to rip out ancient things and are starting to make it really hard to enable/install outdated, deprecated and EOL software because people just keep doing that instead of updating/upgrading. It’s going to start getting to the point the distro can’t do what people need in modern environments and the OSS side won’t be able to be installed on more modern OSes because FreePBX requires some outdated version of something that can’t be installed anymore.
You are preaching to the choir, Tom. Perhaps our choir and Sangoma’s are attending different churches.
The easy thing to do at this point is document what versions work together, as I suggested.
The hard thing to do is update FreePBX, which is more rewarding for the long term.
First steps that almost anyone with basic code editing experience could do to help advance FreePBX to a supported version of PHP:
- review all the breaking changes in PHP from 7.4 up through 8.1
- search through the code (
grepor the search tools in vscode will do just fine) to find the methods, statements, syntax, etc. that have changed, and update them. Bonus if you can make the changes backward compatible to 7.4.
- test it
- submit PRs on git.freepbx.org
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.