Adding Extensions creates Fatal error

Using AsteriskNOW with a fresh installation and it has had nothing done to it. I have successfully installed on a virtual machine before
I get the following error when trying to add a SIP extension in FreePBX:

FATAL ERROR

SELECT * FROM cxpanel_users WHERE user_id = ‘’ [nativecode=1146 ** Table ‘asterisk.cxpanel_users’ doesn’t exist]SQL -
SELECT * FROM cxpanel_users WHERE user_id = ‘’

Trace Back

/var/www/html/admin/libraries/sql.functions.php:25 die_freepbx()
[0]: SELECT * FROM cxpanel_users WHERE user_id = ‘’ [nativecode=1146 ** Table ‘asterisk.cxpanel_users’ doesn’t exist]SQL -
SELECT * FROM cxpanel_users WHERE user_id = ‘’

/var/www/html/admin/modules/cxpanel/functions.inc.php:1185 sql()
[0]: SELECT * FROM cxpanel_users WHERE user_id = ‘’
[1]: getRow
[2]: 2

/var/www/html/admin/modules/cxpanel/functions.inc.php:482 cxpanel_user_get()
[0]:

/var/www/html/admin/libraries/components.class.php:466 cxpanel_extension_configpageload()
[0]: extensions

/var/www/html/admin/config.php:274 component->buildconfigpage()

amportal a ma uninstall cxpanel

How do I uninstall cxpanel?

How do I uninstall cxpanel

Ummm TM1000 just posted instructions, sighhhhh

[quote=“SkykingOH, post:4, topic:24797”]
Ummm TM1000 just posted instructions, sighhhhh
[/quote] Didnt realise that was a command

I tried running the command:

amportal a ma uninstall cxpanel
I get a message saying that module is not installed: cannot uninstall

Ok, maybe the name is not exactly cxpanel.

Ya gotta explore and learn. Most software will give you a list of commands amportal a ma is just a way to invoke module admin. so there are many a commands amportal a ? will list them, and on the same line amportal a ma ? will list all the module_admin commands.

One is list, so amportal a ma list will show you all the installed modules. If you are lazy, as I am, and don’t want to read all of that you can send the output of the command to another command with a pipe “|” grep is a pattern matching tool.

amportal a ma | grep -i panel

Will give you a list of all the modules with panel in the name and description, the -i is for ignore case.

Running open source software involves learning what goes on under the hood not just typing in commands you read on forums.

In fact, if you don’t know what a command does you should look it up before running it.

@SkykingOH
The package is there “cxpanel” it is just already uninstalled.
I used the command
"amportal a ma list"
cxpanel - not installed(locally available)

Well, the bottom line is that one of the cxpanel libraries is hooked into FreePBX and it’s looking for a DB that doesn’t exist.

Not sure how it could have gotten to that point. If this is a fresh install on the VM you might just want to consider reinstalling rather than wasting time figuring out what happened.

You could also try install cxpanel and see if it fixes it then uninstall it.

If you do go the reinstall route I would take a hard look at the Official FreePBX distro. Most of the folks here have no experience with the other distributions and what changes they may make.

rm -Rf /var/www/html/admin/modules/cxpanel

1 Like

Thankyou @tm1000
Removing the module has fixed it :smile:

FYI- This issue occurs when you install the FreePBX Distro on a machine that has no internet access.

The install completes, but the firstboot script, which updates the modules and installs the commercial stuff, never runs…

Follow up- This was on 6.12.65-23. It may not happen with -24. The problem seems to resolve if you update the modules using the Module Admin module.