Fwconsole creates error

Hi,

Recently we wanted to upgrade our FreePBX which has been magnificently reliable for probably 11 year :slight_smile: 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:

  1. () /var/www/html/admin/modules/broadcast/enc/functions.inc.php:0

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

Also, the GUI is down.

The server functions normally for calls.

Any ideas?

Cheers

Jason

From which version did you go to 10.13.66-1

Thanks for speedy response.

I went all the way from FreePBX Distro 5.211.65-11

To the last one I mentioned.

I did them all in order as suggested.

The last one I did was this one.

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

Try

fwconsole ma downloadinstall broadcast --force
fwconsole reload
fwconsole chown
fwconsole reload

Hi,

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:

  1. () /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:
  2. () /var/www/html/admin/modules/broadcast/enc/functions.inc.php:0

Are you using the broadcast module? If not try to temporarily remove it:

rm -rf /var/www/html/admin/modules/broadcast

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:

  1. () /var/www/html/admin/modules/callerid/functions.inc/functions.inc.php:0
    [root@localhost ~]#

It still produces the same error though.

Hi
Try first to upgrade your PBX module Signatures, Then repeat BroadCast module installation,

fwconsole ma refreshsignatures
fwconsole chown
fwconsole ma downloadinstall broadcast

Thanks.

Shahin

Thanks for your response.

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:

  1. () /var/www/html/admin/modules/callerid/functions.inc/functions.inc.php:0
    [root@localhost ~]#

Hi
are you using this module ? I have never seen before at PBX module list this module.

fwconsole ma list | grep modgettext
OR
fwconsole ma listonline | pastebin
cat /etc/resolve.conf

Thanks.

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.

Sorry.

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:

  1. () /var/www/html/admin/modules/callerid/functions.inc/functions.inc.php:0
    You have mail in /var/spool/mail/root
    [root@localhost ~]#

I may have one saved on the machine. It was a real legacy backup so I thought it would not be compatible.

“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.

Thanks for the info.

Yes, well spotted. I had not noticed the difference. I’m not sure what it means either.

I have never added any commercial modules to my system BTW.

All I can say is that the system still works but I can no longer administer the system.

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.

Hi.
Thanks for your suggestion. yum update just say all uptodate.
I have checked places for backups.

Only place I can find is here:-

[root@localhost asterisk]# pwd
/var/spool/asterisk
[root@localhost asterisk]# cd backup
[root@localhost backup]# ls
Default_backup
[root@localhost backup]# ls -alst
total 12
4 drwxrwxr-x. 12 asterisk asterisk 4096 Sep 26 2013 …
4 drwxrwxr-x 3 asterisk asterisk 4096 Apr 1 2013 .
4 drwxrwxr-x 2 asterisk asterisk 4096 Nov 1 2009 Default_backup
[root@localhost backup]# cd Default_backup
[root@localhost Default_backup]# ls
20190901-000001-1567292401-2098384228.tgz 20191201-000001-1575158401-1073537059.tgz 20200301-000001-1583020801-853441204.tgz 20200601-000001-1590966001-1437591604.tgz
20191001-000001-1569884401-913442117.tgz 20200101-000001-1577836801-1433420249.tgz 20200401-000001-1585695601-981534714.tgz 20200701-000001-1593558001-1354023180.tgz
20191101-000001-1572566401-412596487.tgz 20200201-000001-1580515201-1986859621.tgz 20200501-000001-1588287601-905695008.tgz 20200801-000002-1596236402-371308998.tgz
[root@localhost Default_backup]# ls -alst
total 1188
100 -rw-rw-r-- 1 asterisk asterisk 98769 Aug 1 2020 20200801-000002-1596236402-371308998.tgz
100 -rw-rw-r-- 1 asterisk asterisk 98775 Jul 1 2020 20200701-000001-1593558001-1354023180.tgz
100 -rw-rw-r-- 1 asterisk asterisk 98775 Jun 1 2020 20200601-000001-1590966001-1437591604.tgz
100 -rw-rw-r-- 1 asterisk asterisk 98732 May 1 2020 20200501-000001-1588287601-905695008.tgz
100 -rw-rw-r-- 1 asterisk asterisk 98706 Apr 1 2020 20200401-000001-1585695601-981534714.tgz
100 -rw-rw-r-- 1 asterisk asterisk 98599 Mar 1 2020 20200301-000001-1583020801-853441204.tgz
100 -rw-rw-r-- 1 asterisk asterisk 98587 Feb 1 2020 20200201-000001-1580515201-1986859621.tgz
96 -rw-rw-r-- 1 asterisk asterisk 98260 Jan 1 2020 20200101-000001-1577836801-1433420249.tgz
96 -rw-rw-r-- 1 asterisk asterisk 97933 Dec 1 2019 20191201-000001-1575158401-1073537059.tgz
96 -rw-rw-r-- 1 asterisk asterisk 97790 Nov 1 2019 20191101-000001-1572566401-412596487.tgz
96 -rw-rw-r-- 1 asterisk asterisk 97728 Oct 1 2019 20191001-000001-1569884401-913442117.tgz
96 -rw-rw-r-- 1 asterisk asterisk 97674 Sep 1 2019 20190901-000001-1567292401-2098384228.tgz
4 drwxrwxr-x 3 asterisk asterisk 4096 Apr 1 2013 …
4 drwxrwxr-x 2 asterisk asterisk 4096 Nov 1 2009 .
[root@localhost Default_backup]# rm -rf /var/www/html/admin/modules/areminder

Cheers for your help.

I started removing commercial modules using the following. FYI, I have never used commercial modules.

Below is what happens when I run fwconsole now

[root@localhost modules]# rm -rf /var/www/html/admin/modules/endpoint
[root@localhost modules]# ls
announcement _cache cidlookup daynight endpointman framework ivrpro miscdests pbdirectory queueprio setcid update.sh weakpasswords
asterisk-cli callback conferences dictate _ep_phone_modules hotelwakeup javassh misdn phonebook queues sipsettings userpaneltab webcallback
asteriskinfo callforward core directory extensionroutes iaxsettings languages modlist.sh phpagiconf qxact_reports sipstation versionupgrade xmpp
backup callrecording customappsreg directorypro extensionsettings import.sh languagestatus music phpinfo recordings speeddial versionupgrade-2.10.0beta1.0.tgz
blacklist callwaiting customcontexts disa fax infoservices logfiles outroutemsg pinsets remove.sh status.sh vmblast
bulkdids campon dahdiconfig donotdisturb featurecodeadmin irc manager paging pinsetspro restart sysadmin vmnotify
bulkextensions cdr dashboard dundicheck findmefollow ivr miscapps parking printextensions ringgroups timeconditions voicemail
[root@localhost modules]# fwconsole
PHP Fatal error: Class ‘modgettext’ not found in /var/www/html/admin/modules/directorypro/enc/functions.inc.php on line 0
Whoops\Exception\ErrorException: Class ‘modgettext’ not found in file /var/www/html/admin/modules/directorypro/enc/functions.inc.php on line 0
Stack trace:

  1. () /var/www/html/admin/modules/directorypro/enc/functions.inc.php:0
    [root@localhost modules]# pwd
    /var/www/html/admin/modules
    [root@localhost modules]#

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