I am running Asterisk 11.7.0 with the SHMZ release 6.4. After a module upgrade (I don’t know which one), I can’t access the web UI anymore. If I try to go to the asterisk URL, I get redirected to xxx.xxx.x.x/admin/config.php.
If I try to run the command : sudo -u asterisk /var/lib/asterisk/bin/module_admin upgradeall in order to upgrade all modules, I get this output: PHP Warning: include_once(/etc/asterisk/freepbx.conf): failed to open stream: Permission denied in /var/lib/asterisk/bin/module_admin on line 16
PHP Warning: include_once(): Failed opening ‘/etc/asterisk/freepbx.conf’ for inclusion (include_path=’.:/usr/share/pear:/usr/share/php’) in /var/lib/asterisk/bin/module_admin on line 16
PHP Fatal error: Call to undefined function fpbx_framework_autoloader() in /var/lib/asterisk/bin/module_admin on line 21
Before that error, I was getting : PHP Warning: include_once(/etc/asterisk/freepbx.conf): failed to open stream: No such file or directory in /var/lib/asterisk/bin/module_admin on line 16
PHP Warning: include_once(): Failed opening ‘/etc/asterisk/freepbx.conf’ for inclusion (include_path=’.:/usr/share/pear:/usr/share/php’) in /var/lib/asterisk/bin/module_admin on line 16
PHP Fatal error: Call to undefined function fpbx_framework_autoloader() in /var/lib/asterisk/bin/module_admin on line 21
so I moved the freepbx.conf file which was located in /etc/freepbx.conf to /etc/asterisk/freepbx.conf and now I get the first output.
“*PHP Warning: include_once(/etc/asterisk/freepbx.conf): failed to open stream: Permission denied in /var/lib/asterisk/bin/module_admin on line 16”
make it seem that is a user permission problem. Try to check file permission and make sure your asterisk user (tipically “asterisk”) can access those files. If that is the problem, can be solved easily with chown command
After having changed the owner and the permissions of the file /etc/asterisk/freepbx.conf, I get this error:
[root@localhost asterisk]# sudo -u asterisk /var/lib/asterisk/bin/module_admin upgradeall
PHP Parse error: syntax error, unexpected ‘[’, expecting T_PAAMAYIM_NEKUDOTAYIM in /var/www/html/admin/bootstrap.php on line 122
I did :
chmod 755 /etc/asterisk/freepbx.conf
chown -c asterisk:asterisk /etc/asterisk/freepbx.conf
If I execute the command as root user, i get no output and no errors. If I execute the command as asterisk user, I get the PHP Parse error…
Apparently, bootstrap was updated and now it doesn’t use the same syntax. Before the update, the database name was writtien between simple quotes. After the update, it’s defined in $amp_conf[‘AMPDBNAME’]. That was the issue. Once, it’s defined, we can see the web ui again.