Recently we wanted to upgrade our FreePBX which has been magnificently reliable for probably 11 year but I think there are quite a few security gaps in the version we were running so we ran manually many scripts until we eventually finished at this script:-
upgrade-10.13.66-1.sh
Our system still works. When we reboot, it needs us to restart asterisk manually as there is a problem with fwconsole.
Whatever command I run for fwconsole, I get the following:-
[root@localhost ~]# fwconsole chown
PHP Fatal error: Class âmodgettextâ not found in /var/www/html/admin/modules/broadcast/enc/functions.inc.php on line 0
Whoops\Exception\ErrorException: Class âmodgettextâ not found in file /var/www/html/admin/modules/broadcast/enc/functions.inc.php on line 0
Stack trace:
If I run locate fwconsole, the results are as follows:-
[root@localhost ~]# locate fwconsole
/usr/sbin/fwconsole
/usr/src/freepbx-13.0.192.16/amp_conf/bin/fwconsole
/var/lib/asterisk/bin/fwconsole
/var/www/html/admin/modules/framework/amp_conf/bin/fwconsole
You have mail in /var/spool/mail/root
FreePBX Distro 6.12.65-100 This will take your 6.12.65 version system to a 10.13.66-1 version and track. Please note 10.13.66 is the Current STABLE and 6.12.65 will be End of Life 12-31-15
Regardless of which fwconsole command I run, I get the same error.
[root@localhost ~]# fwconsole ma downloadinstall broadcast --force
PHP Fatal error: Class âmodgettextâ not found in /var/www/html/admin/modules/broadcast/enc/functions.inc.php on line 0
Whoops\Exception\ErrorException: Class âmodgettextâ not found in file /var/www/html/admin/modules/broadcast/enc/functions.inc.php on line 0
Stack trace:
() /var/www/html/admin/modules/broadcast/enc/functions.inc.php:0
[root@localhost ~]# fwconsole reload
PHP Fatal error: Class âmodgettextâ not found in /var/www/html/admin/modules/broadcast/enc/functions.inc.php on line 0
Whoops\Exception\ErrorException: Class âmodgettextâ not found in file /var/www/html/admin/modules/broadcast/enc/functions.inc.php on line 0
Stack trace:
Thanks. I have removed but still getting same issues.
[root@localhost ~]# rm -rf /var/www/html/admin/modules/broadcast
You have mail in /var/spool/mail/root
[root@localhost ~]# fwconsole ma downloadinstall broadcast --force
PHP Fatal error: Class âmodgettextâ not found in /var/www/html/admin/modules/callerid/functions.inc/functions.inc.php on line 0
Whoops\Exception\ErrorException: Class âmodgettextâ not found in file /var/www/html/admin/modules/callerid/functions.inc/functions.inc.php on line 0
Stack trace:
Not sure if you mean to run just those there commands that you suggest or do something different but any command I run using fwconsole will not work on my system.
See below. Cheers.
[root@localhost ~]# fwconsole ma refreshsignatures
PHP Fatal error: Class âmodgettextâ not found in /var/www/html/admin/modules/callerid/functions.inc/functions.inc.php on line 0
Whoops\Exception\ErrorException: Class âmodgettextâ not found in file /var/www/html/admin/modules/callerid/functions.inc/functions.inc.php on line 0
Stack trace:
Do you have a usable backup from the original system? If so, I recommend setting up a FreePBX 15 system in a temp location and restoring from the legacy backup. It should work, and if it does, youâll be further ahead then attempting to resurrect the 13 system which is still 2 versions out of date.
I have used Freepbx for years but I do not believe I have put any extra modules in and my technical knowledge of the backend is not that brilliant.
All I know is that whenever I run fwconsole, I get and error and if I try the predecessor, am portal, I end up with the same crap as it says itâs deprecated and tries to run fwconsole.
[root@localhost ~]# amportal
Fetching FreePBX settings with gen_amp_conf.phpâŚ
!!!amportal is depreciated. Please use fwconsole!!!
forwarding all commands to âfwconsoleâ
PHP Fatal error: Class âmodgettextâ not found in /var/www/html/admin/modules/callerid/functions.inc/functions.inc.php on line 0
Whoops\Exception\ErrorException: Class âmodgettextâ not found in file /var/www/html/admin/modules/callerid/functions.inc/functions.inc.php on line 0
Stack trace:
() /var/www/html/admin/modules/callerid/functions.inc/functions.inc.php:0
You have mail in /var/spool/mail/root
[root@localhost ~]#
âmodgettextâ is not a FreePBX module, itâs a library used by multiple modules.
It may be coincidence, but the error was in âbroadcastâ and jumped to âcalleridâ once broadcast was deleted. Both are commercial modules. Not sure whatâs that worth, if anything.
The problem isnât moving. Itâs a problem with fwconsole itself. Every time he runs fwconsole, regardless of the options, he gets the error.
If you can get into the system, Iâd recommend running a backup and save everything you can. If that works (and it might not because modgettext is a PHP module) you can reinstall the system from the ISO and restore the backup into the new installation.
You might also try a âyum updateâ command to see if one or more of the support routines is horked up.
From what we can see it is moving from commercial module to commercial module.
It went from: /var/www/html/admin/modules/broadcast/functions.inc/functions.inc.php
to the next alphabetical commercial module at: /var/www/html/admin/modules/callerid/functions.inc/functions.inc.php
The default âmodgettextâ used by fwconsole and non-commercial modules is at: /var/www/html/admin/modules/libraries/modgettext.class.php
Looks like the commercial modules bundle their own version of the code. Something in the script trashed them - and who knows what else.
As a WTF attempt, Iâd probably try removing all commercial modules to see what happens. Still, itâs likely to be a game of whack-a-mole and I would probably never be comfortable not knowing what else may have been trashed.