Getting error message after Module updates

Updated modules today on a FreePBX 13.0.167 system. No error message when doing it except when I click on Apply Config I get this error message;

exit: 1
Whoops\Exception\ErrorException: syntax error, unexpected $end in Unknown on line 16
in file /var/www/html/admin/modules/dahdiconfig/functions.inc.php on line 161
Stack trace:

  1. Whoops\Exception\ErrorException->() /var/www/html/admin/modules/dahdiconfig/functions.inc.php:161
  2. Whoops\Run->handleError() :0
  3. parse_ini_string() /var/www/html/admin/modules/dahdiconfig/functions.inc.php:161
  4. dahdi_config2array() /var/www/html/admin/modules/dahdiconfig/includes/dahdi_cards.class.php:882
  5. dahdi_cards->read_dahdi_scan() /var/www/html/admin/modules/dahdiconfig/includes/dahdi_cards.class.php:479
  6. dahdi_cards->load() /var/www/html/admin/modules/dahdiconfig/includes/dahdi_cards.class.php:160
  7. dahdi_cards->__construct() /var/www/html/admin/modules/dahdiconfig/functions.inc.php:21
  8. dahdiconfig_conf->dahdiconfig_conf() /var/lib/asterisk/bin/retrieve_conf:585

Need some ideas on where to start to fix this at.

Please paste the output of

su asterisk
/usr/sbin/dahdi_scan

[email protected]:/root $ /usr/sbin/dahdi_scan
[1]
active=yes
alarms=OK
description=Wildcard A4B
name=WCTDM/0
manufacturer=Digium
devicetype=Wildcard A4B (VPMOCT032)
location=PCI Bus 01 Slot 01
basechan=1
totchans=4
irq=0
type=analog
port=1,FXO
port=2,FXO
port=3,FXO
port=4,FXO

Ended up having to go to command line and do a fwconsole ma delete dahdiconfig…restarted and it is working again. I did not install the dahdiconfig again might do that later once I see there is a new version other then the one that is up there now.

If it gets reinstalled, go to Moudle Admin and just DISABLE it. That way, it won’t get reinstalled automagically.

Hi

I am getting the exact same error message and problem as m2moore in the original post when I try to apply config as above post an update of DAHDI Config to 13.0.33.

If I go back to Module Admin and try and do a “Check Online” I get an error page with title

Whoops\Exception\ErrorException thrown with message “syntax error, unexpected $end in Unknown on line 16

Stacktrace:
#12 Whoops\Exception\ErrorException in /var/www/html/admin/modules/dahdiconfig/functions.inc.php:161
#11 Whoops\Run:handleError in <#unknown>:0
#10 parse_ini_string in /var/www/html/admin/modules/dahdiconfig/functions.inc.php:161
#9 dahdi_config2array in /var/www/html/admin/modules/dahdiconfig/includes/dahdi_cards.class.php:882
#8 dahdi_cards:read_dahdi_scan in /var/www/html/admin/modules/dahdiconfig/includes/dahdi_cards.class.php:479
#7 dahdi_cards:load in /var/www/html/admin/modules/dahdiconfig/includes/dahdi_cards.class.php:160
#6 dahdi_cards:__construct in /var/www/html/admin/modules/dahdiconfig/functions.inc.php:418
#5 dahdiconfig_module_repo_parameters_callback in /var/www/html/admin/libraries/usage_registry.functions.php:509
#4 mod_func_iterator in /var/www/html/admin/libraries/modulefunctions.class.php:2902
#3 module_functions:generate_remote_urls in /var/www/html/admin/libraries/modulefunctions.class.php:2785
#2 module_functions:get_remote_contents in /var/www/html/admin/libraries/modulefunctions.class.php:125
#1 module_functions:getonlinexml in /var/www/html/admin/page.modules.php:119
#0 include in /var/www/html/admin/config.php:390

The output of my /usr/sbin/dahdi_scan is as follows

[1]
active=yes
alarms=OK
description=Wildcard TDM400P REV E/F Board 5
name=WCTDM/4
manufacturer=Digium
devicetype=Wildcard TDM400P REV E/F
location=PCI Bus 05 Slot 05
basechan=1
totchans=4
irq=0
type=analog
port=1,FXO
port=2,none
port=3,none
port=4,none

Any easy fixes rather than uninstalling the module like m2oore had to? How can I revert to a previous version?

Thank you

Jim

Uninstalling the Module will not effect your ability to use your Digium card. If it was already setup and working correctly before the update uninstalling will keep the config file intact. BTW…I got the same error message you described as well when trying to check online in Module Admin that is why I was forced to do it in command line.

I am having similar issues installing the dahdiconfig module. Version of dahdiconfig is 13.0.33.12. Results of dahdi_scan are at the end.

Symptom is
[Whoops\Exception\ErrorException]
syntax error, unexpected $end in Unknown on line 72

Phone system is operational including the PRI using Xorcom Astribank if I hand-configure the chan_dahdi*.conf files

If I try to install the dahdiconfig module from either the command line or the GUI I get varying results.

I can get things running again by removing the dahdiconfig module.

IF DAHDI is running:
[[email protected] ~]# fwconsole ma downloadinstall dahdiconfig
No repos specified, using: [commercial,unsupported,extended,standard] from last GUI settings

Starting dahdiconfig download…
Processing dahdiconfig
Verifying local module download…Verified
Extracting…Done
Module dahdiconfig successfully downloaded
Creating Dahdi Advanced Settings Table
Checking tables…Done
Creating Dahdi Analog Table
Create Configured Locations Table
Creating Dahdi Advanced Modules Table
Migrating Old Data from Dahdi Advanced Table
Inserting Old Data from Dahdi Advanced Table
Deleting old dahdi module data from database (its been migrated)
Replacing…tone_region…language…busydetect…busycount…usecallerid…callwaiting…usecallingpres…threewaycalling…transfer…cancallforward…callreturn…echocancel…echocancelwhenbridged…echotraining…immediate…faxdetect…rxgain…txgain…Done
Migrating module wctdm24xxp from serialized data to json
Creating dahdi modules Table
Add type column
add additional column
Adding txgain and rxgain column to analog table

[Whoops\Exception\ErrorException]
syntax error, unexpected $end in Unknown on line 72

If Dahdi is not running

[[email protected] ~]# service dahdi stop
Unloading DAHDI hardware modules: done
[[email protected] ~]# fwconsole ma downloadinstall dahdiconfig
No repos specified, using: [commercial,unsupported,extended,standard] from last GUI settings

Starting dahdiconfig download…
Processing dahdiconfig
Verifying local module download…Verified
Extracting…Done
Module dahdiconfig successfully downloaded
Checking tables…Done
Generating CSS…Done
Module dahdiconfig successfully installed
Updating Hooks…Done
[[email protected] ~]#

Then

[[email protected] ~]# amportal restart

Please wait…

!!!amportal is depreciated. Please use fwconsole!!!
forwarding all commands to 'fwconsole’
Running FreePBX shutdown…

Shutting down Asterisk Gracefully. Will forcefully kill after 30 seconds.
Press C to Cancel
Press N to shut down NOW
[============================] 1 sec
Wanrouter: No valid Sangoma Hardware found, if you have no Sangoma cards this is OK
Stopping DAHDi for Digium Cards
DAHDi Stopped
Running FreePBX startup…
Wanrouter: No valid Sangoma Hardware found, if you have no Sangoma cards this is OK
Starting DAHDi for Digium Cards
DAHDi Started

[Whoops\Exception\ErrorException]
syntax error, unexpected $end in Unknown on line 72

[[email protected] asterisk]# su asterisk
bash-4.1$ dahdi_scan
[1]
active=yes
alarms=RED
description=Xorcom XPD [usb:X1066801].1: T1
name=XBUS-00/XPD-00
manufacturer=Xorcom Inc.
devicetype=Astribank2
location=usb-0000:00:1a.0-1.5
basechan=1
totchans=24
irq=0
type=digital-T1
syncsrc=0
lbo=0 db (CSU)/0-133 feet (DSX-1)
coding_opts=B8ZS,AMI
framing_opts=ESF,D4
coding=B8ZS
framing=ESF
[2]
active=yes
alarms=RED
description=Xorcom XPD [usb:X1066801].2: T1
name=XBUS-00/XPD-01
manufacturer=Xorcom Inc.
devicetype=Astribank2
location=usb-0000:00:1a.0-1.5
basechan=25
totchans=24
irq=0
type=digital-T1
syncsrc=0
lbo=0 db (CSU)/0-133 feet (DSX-1)
coding_opts=B8ZS,AMI
framing_opts=ESF,D4
coding=B8ZS
framing=ESF
[3]
active=yes
alarms=RED
description=Xorcom XPD [usb:X1066801].3: T1
name=XBUS-00/XPD-02
manufacturer=Xorcom Inc.
devicetype=Astribank2
location=usb-0000:00:1a.0-1.5
basechan=49
totchans=24
irq=0
type=digital-T1
syncsrc=0
lbo=0 db (CSU)/0-133 feet (DSX-1)
coding_opts=B8ZS,AMI
framing_opts=ESF,D4
coding=B8ZS
framing=ESF
[4]
active=yes
alarms=RED
description=Xorcom XPD [usb:X1066801].4: T1
name=XBUS-00/XPD-03
manufacturer=Xorcom Inc.
devicetype=Astribank2
location=usb-0000:00:1a.0-1.5
basechan=73
totchans=24
irq=0
type=digital-T1
syncsrc=0
lbo=0 db (CSU)/0-133 feet (DSX-1)
coding_opts=B8ZS,AMI
framing_opts=ESF,D4
coding=B8ZS
framing=ESF
bash-4.1$ ^C
bash-4.1$

Probably best to not use Dahdi config in your situation. We never did nail down the issue.

Hi can anyone know what can it be ?

amportal a r

Please wait…

!!!amportal is depreciated. Please use fwconsole!!!
forwarding all commands to 'fwconsole’
Reloading FreePBX
Error(s) have occured, the following is the retrieve_conf output:
exit: 255
PHP Fatal error: Allowed memory size of 262144 bytes exhausted (tried to allocate 17628 bytes) in /var/www/html/admin/libraries/php-asmanager.php on line 304

p.s. searched in different forums, they describe to increase in php.ini, but i have

php -i | grep -i "Loaded Configuration File"
Loaded Configuration File => /etc/php.ini

php -r "echo ini_get(‘memory_limit’).PHP_EOL;"
2048M

and dont know where to find where he take only size of 262144 bytes Please help! (((

The issue is missing eol character in dahdi_scan output, so function parse_ini_string in dahdi_config2array fails. I’ve fixed it by renaming original dahdi_scan to dahdi_scan_orig, and creating script dahdi_scan with 2 lines:

dahdi_scan_orig
echo

Can somebody fix original dahdiconfig module? Thanks

Could you please Pastebin the base64’ed output? Something like

dahdi_scan_orig | base64 | pastebin

So we have exactly the output that is breaking.

I am not familiar with pastebin. This is base64 output

WzFdCmFjdGl2ZT15ZXMKYWxhcm1zPU9LCmRlc2NyaXB0aW9uPVdpbGRjYXJkIEFFWDgwMApuYW1l
PVdDVERNLzAKbWFudWZhY3R1cmVyPURpZ2l1bQpkZXZpY2V0eXBlPVdpbGRjYXJkIEFFWDgwMAps
b2NhdGlvbj1QQ0kgRXhwcmVzcyBCdXMgMDIgU2xvdCAwOQpiYXNlY2hhbj0xCnRvdGNoYW5zPTgK
aXJxPTAKdHlwZT1hbmFsb2cKcG9ydD0xLEZYTwpwb3J0PTIsRlhPCnBvcnQ9MyxGWE8KcG9ydD00
LEZYTwpwb3J0PTUsRlhTCnBvcnQ9NixGWFMKcG9ydD03LEZYUwpwb3J0PTgsRlhTCg==

Two years now and this still has not been resolved?

Do you need that module installed? Did you try uninstalling?

“We never did nail down the issue”

The code is open source. Its all yours.