# amportal
Fetching FreePBX settings with gen_amp_conf.php..
/usr/local/sbin/amportal: line 52: Whoops\Exception\ErrorException:: command not found
/var/lib/asterisk/bin/freepbx_engine: line 100: Whoops\Exception\ErrorException:: command not found
**** WARNING: ERROR IN CONFIGURATION ****
astrundir in '/etc/asterisk' is set to but the directory
does not exists. Attempting to create it with: 'mkdir -p '
mkdir: missing operand
Try `mkdir --help' for more information.
**** ERROR: COULD NOT CREATE ****
Attempt to execute 'mkdir -p ' failed with an exit code of 1
You must create this directory and the try again.
Running the GUI returns the following:
Whoops \ Exception \ ErrorException (E_WARNING)
trim() expects parameter 1 to be string, array given
/var/www/html/admin/libraries/modulefunctions.class.php
$parser = new xml2Array($data);
$xmlarray = $parser->data;
if (isset($xmlarray['module'])) {
// add a couple fields first
$xmlarray['module']['name'] = str_replace("\n&\n","&",$xmlarray['module']['name']);
$xmlarray['module']['displayname'] = $xmlarray['module']['name'];
if (isset($xmlarray['module']['description'])) {
$xmlarray['module']['description'] = trim(str_replace("\n","",$xmlarray['module']['description']));
if (isset($xmlarray['module']['methods'])) {
Please find fwconsole it’s on your system. Use locate.
Once you find it then run it and see what the output is.
Just FYI: Elastix doesn’t recommend running FreePBX updates ever.
after a failed freepbx 13 upgrade… AMPORTAL will not run. Below is the returned msg
# amportal
Fetching FreePBX settings with gen_amp_conf.php..
/usr/local/sbin/amportal: line 52: Whoops\Exception\ErrorException:: command not found
/var/lib/asterisk/bin/freepbx_engine: line 100: Whoops\Exception\ErrorException:: command not found
**** WARNING: ERROR IN CONFIGURATION ****
astrundir in '/etc/asterisk' is set to but the directory
does not exists. Attempting to create it with: 'mkdir -p '
mkdir: missing operand
Try `mkdir --help' for more information.
**** ERROR: COULD NOT CREATE ****
Attempt to execute 'mkdir -p ' failed with an exit code of 1
You must create this directory and the try again.
./fwconsole
Whoops\Exception\ErrorException: trim() expects parameter 1 to be string, array given in file /var/www/html/admin/libraries/modulefunctions.class.php on line 2128
Stack trace:
Whoops\Exception\ErrorException->() /var/www/html/admin/libraries/modulefunctions.class.php:2128
Whoops\Run->handleError() :0
trim() /var/www/html/admin/libraries/modulefunctions.class.php:2128
module_functions->_readxml() /var/www/html/admin/libraries/modulefunctions.class.php:622
module_functions->getinfo() /var/www/html/admin/libraries/utility.functions.php:1347
_bootstrap_parse_hooks() /var/www/html/admin/libraries/utility.functions.php:1322
bootstrap_include_hooks() /var/www/html/admin/bootstrap.php:257
require_once() /etc/freepbx.conf:9
include_once() /var/lib/asterisk/bin/fwconsole:12
There is a module on your system (NOTE: Nothing from Sangoma, a third party module). That has multiple < description > tags in it. This breaks all sorts of things of course (and is not to spec)
You’ll have to find that module. Look in /var/www/html/admin/modules/*/module.xml
There will be a lot of them.
These are the modules I found but could not find any with multiple description tags.
find . -name “module.xml” -exec grep -cH <description> {} ;
./conferences/module.xml:1
./customcontexts/module.xml:1
./bulkextensions/module.xml:1
./accountcodepreserve/module.xml:1
./customappsreg/module.xml:1
./directory/module.xml:0
./javassh/module.xml:1
./queues/module.xml:1
./cos/module.xml:1
./digium_phones/module.xml:0
./pbdirectory/module.xml:1
./miscdests/module.xml:1
./superfecta/module.xml:1
./irc/module.xml:1
./setcid/module.xml:1
./motif/module.xml:1
./speeddial/module.xml:0
./cdr/module.xml:1
./dictate/module.xml:1
./campon/module.xml:1
./ivr/module.xml:1
./extcfg/module.xml:0
./miscapps/module.xml:1
./outroutemsg/module.xml:1
./callback/module.xml:0
./phpinfo/module.xml:0
./queueprio/module.xml:1
./ringgroups/module.xml:1
./callrecording/module.xml:1
./sipstation/module.xml:1
./framework/module.xml:1
./phonebook/module.xml:1
./bulkdids/module.xml:1
./logfiles/module.xml:0
./disa/module.xml:1
./recordings/module.xml:1
./hotelwakeup/module.xml:1
./asteriskinfo/module.xml:1
./parking/module.xml:1
./cidlookup/module.xml:1
./languagestatus/module.xml:1
./dashboard/module.xml:1
./fax/module.xml:1
./vmblast/module.xml:1
./isymphony/module.xml:1
./digiumaddoninstaller/module.xml:0
./weakpasswords/module.xml:1
./restart/module.xml:1
./dahdiconfig/module.xml:0
./callforward/module.xml:1
./donotdisturb/module.xml:1
./tts/module.xml:1
./announcement/module.xml:1
./iaxsettings/module.xml:1
./infoservices/module.xml:1
./daynight/module.xml:1
./featurecodeadmin/module.xml:0
./texttospeech/module.xml:1
./sysadmin/module.xml:1
./panel/module.xml:1
./sipsettings/module.xml:1
./manager/module.xml:0
./asterisk-cli/module.xml:1
./presencestate/module.xml:1
./backup/module.xml:1
./fop2admin/module.xml:1
./findmefollow/module.xml:1
./languages/module.xml:1
./callwaiting/module.xml:1
./music/module.xml:1
./userman/module.xml:1
./bosssecretary/module.xml:1
./paging/module.xml:1
./blacklist/module.xml:0
./fw_ari/module.xml:1
./cdrcost/module.xml:1
./voicemail/module.xml:1
./timeconditions/module.xml:1
./versionupgrade/module.xml:1
./endpointman/module.xml:1
./pinsets/module.xml:1
./extensionsettings/module.xml:1
./printextensions/module.xml:1
./contactdir/module.xml:1
./core/module.xml:0
On the status page was a notification for the WGET module in the advance page setting.
Forced MODULEADMINWGET to true
The system detected a problem trying to access external server data and changed internal setting MODULEADMINWGET (Use wget For Module Admin) to true, see the tooltip in Advanced Settings for more details.
After hitting the submit button and Apply changes… now getting the following errors
Whoops\Exception\ErrorException
/var/www/html/admin/libraries/php-asmanager.php237
“Whoops \ Exception \ ErrorException (E_WARNING)
fwrite(): 54 is not a valid stream resource”
hlusher:
“Whoops \ Exception \ ErrorException (E_WARNING)HELPfwrite(): 54 is not a valid stream resource”
FreePBX is not connected to Asterisk
Under the Applications/Extensions Menu… I can click on Extensions… but there are no extensions that show up… There is an error log on the right hand side.
Whoops\Exception\ErrorException
fwrite(): 53 is not a valid stream resource
File:/var/www/html/admin/libraries/php-asmanager.php:237