Probably another check the script needs to make - I started an upgrade on a box last night and I didn’t know Edge was enabled (another Admin did it for a Module and didn’t turn it off!).
Fast Forward and it blew up completely - framework update crashed, and because it is the lynch-pin for every other module, I ended up with a dead box - no asterisk, broken GUI hung on Modules to install and no connection to Asterisk (which would crash on fwconsole start,
In case somebody else makes this (stupid but innocent) mistake, here is what I had to do to fix it:
Updating framework died very spectacularly with this error:
PHP Fatal error: Call to a member function writeln() on string in /var/www/html/admin/modules/framework/install.php on line 38
Whoops\Exception\ErrorException: Call to a member function writeln() on string in file /var/www/html/admin/modules/framework/install.php on line 38
Stack trace:
- Whoops\Exception\ErrorException->() /var/www/html/admin/modules/framework/install.php:38
Found this post: Freepbx 14 to 15 upgrade tool stops - Distro Discussion & Help - FreePBX Community Forums
But their solution did not work for me at all
Looking at the console it was saying that it was bombing on line 38 - Here is the section from /var/www/html/admin/modules/framework/install.php that was crashing:
}
$engine_info = engine_getinfo();
$astversion = $engine_info['version'];
if (version_compare($astversion, "13", "lt") || version_compare($astversion, "19", "ge")) {
out(sprintf(_("<error>Error!</error>")));
out(sprintf(_("<error>Unsupported Version of %s </error>"), $astversion));
out(sprintf(_("<error>Supported Asterisk versions: 13, 14, 15, 16, 17, 18</error>")));
exit(1);
}
I had installed (and verified) Asterisk 18 before I started the upgrade, so I commented out the check like so:
}
$engine_info = engine_getinfo();
$astversion = $engine_info['version'];
//if (version_compare($astversion, "13", "lt") || version_compare($astversion, "19", "ge")) {
// out(sprintf(_("<error>Error!</error>")));
// out(sprintf(_("<error>Unsupported Version of %s </error>"), $astversion));
// out(sprintf(_("<error>Supported Asterisk versions: 13, 14, 15, 16, 17, 18</error>")));
// exit(1);
//}
and then did a fwconsole ma install framework and it finally completed successfully! Fix the file back and then install the rest of the broken/disabled modules and life was good - In researching that error, I found several posts that said it was hopeless - it’s not. Hopefully this will help someone that borks their machine like I did.
I do think the upgrade script should check for Edge though…