FreePBX - there was an error - just minutes after fresh install

NethServer Version: System version
NethServer release 7.5.1804 (final)
Module: FreePBX

installed the server 3 times till i got the hint… its not me its the nethserver…

everytime i install nethserver and i dont touch any settings or anything… minutes hours after i get an error that look strange

i have no idea how to explain it or how to so i uploaded a photo…

i want to think the issue is its AUTO updating thats why so maybe if i find away to turn off updates might work.

Sometimes I’ve seen this, but wasn’t able to reproduce. I’ll try again.
meanwile, you can fix by launching
scl enable rh-php56 -- fwconsole chown

1 Like

also, disabling FreePBX modules auto updates is a bit tricky, on the enterprise we do it by overwriting the modules repository in the database. Remember that you are disabling also FreePBX security updates

mysql asterisk -e 'UPDATE `module_xml` SET `data` = "http://nethserver.org" WHERE id = "module_repo"'
mysql asterisk -e 'UPDATE `freepbx_settings` SET `value` = "http://nethserver.org" WHERE keyword = "MODULE_REPO"'

When you want to manually update modules, launch

# enable FreePBX mirrors to update modules
mysql asterisk -e 'UPDATE `module_xml` SET `data` = "http://mirror1.freepbx.org,http://mirror2.freepbx.org" WHERE id = "module_repo"'
mysql asterisk -e 'UPDATE `freepbx_settings` SET `value` = "http://mirror1.freepbx.org,http://mirror2.freepbx.org" WHERE keyword = "MODULE_REPO"'

# update all modules
scl enable rh-php56 -- fwconsole ma upgradeall

and then disable again

2 Likes

it worked. amazing.

this is the error i get after doing it… minutes later

PHP Parse error: syntax error, unexpected ‘class’ (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or ‘{’ or ‘$’ in /var/www/html/freepbx/admin/libraries/Composer/vendor/symfony/translation/Translator.php on line 90
Whoops\Exception\ErrorException: syntax error, unexpected ‘class’ (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or ‘{’ or ‘$’ in file /var/www/html/freepbx/admin/libraries/Composer/vendor/symfony/translation/Translator.php on line 90
Stack trace:

  1. Whoops\Exception\ErrorException->() /var/www/html/freepbx/admin/libraries/Composer/vendor/symfony/translation/Translator.php:90

where do you get this error?

take a look at this issue: nethserver-freepbx: use php 5.6 to execute Asterisk AGI · Issue #5499 · NethServer/dev · GitHub if you have nethserver-freepbx at version 14.0.10-1 it should be fixed. (check with rpm -ql nethserver-freepbx)

if you get it in AGI, it should be fixed for AGI that uses #!/usr/bin/env php as shebang, two FreePBX AGI doesn’t, I’ve PR for that but they didn’t merged yet Use #!/usr/bin/env php as shebang by Stell0 · Pull Request #3 · FreePBX/calendar · GitHub and Use #!/usr/bin/env php as shebang by Stell0 · Pull Request #5 · FreePBX/recordings · GitHub. Meanwhile you can manually change those AGI, you found them in /var/lib/asterisk/agi-bin/

Another workaround you can do is this:
edit /var/www/html/freepbx/admin/libraries/Composer/vendor/symfony/translation/Translator.php
and change line 90

-            @trigger_error(sprintf('Passing a "%s" instance into the "%s" as a second argument is deprecated since Symfony 3.4 and will be removed in 4.0. Inject a "%s" implementation instead.', MessageSelector::class, __METHOD__, MessageFormatterInterface::class), E_USER_DEPRECATED);
+            @trigger_error(sprintf('Passing a "%s" instance into the "%s" as a second argument is deprecated since Symfony 3.4 and will be removed in 4.0. Inject a "%s" implementation instead.', 'MessageSelector::class', __METHOD__, 'MessageFormatterInterface::class'), E_USER_DEPRECATED);

all working… turns out i just had to re-install and once i used the info above all worked no issues since.