[FATAL] fatal error reading freepbx_settings

Hi,

I have tried to upgrade 2.8.4 to 2.9 Beta. Followed the instructions. Experienced Abend in the first step.

Opened Ticket #4954, did not get anywhere…

See details below.

Checking for upgrades…3 found
Upgrading to 2.9.0alpha1…
-> Running PHP script /var/www/html/admin/modules/framework/upgrades//2.9.0alpha1/tables.php
Add field providedest to featurecodes…Done
Checking for schema changes for core’s users table.
Checking for noanswer_cid field…added
Checking for busy_cid field…added
Checking for chanunavail_cid field…added
Checking for noanswer_dest field…added
Checking for busy_dest field…added
Checking for chanunavail_dest field…added
-> Running PHP script /var/www/html/admin/modules/framework/upgrades//2.9.0alpha1/migrate_ampconf.php
Checking for freepbx_settings table…exists
Add field sortorder to freepbx_settings…Done
Initialize freepbx_conf settings…[FATAL] fatal error reading freepbx_settings Array ( [0] => Array ( [file] => /var/www/html/admin/libraries/freepbx_conf.class.php [line] => 217 [function] => die_freepbx [args] => Array ( [0] => fatal error reading freepbx_settings ) ) [1] => Array ( [file] => /var/www/html/admin/libraries/freepbx_conf.class.php [line] => 190 [function] => __construct [class] => freepbx_conf [object] => freepbx_conf Object ( [legacy_conf_defaults] => Array ( [AMPDBENGINE] => Array ( [0] => select [1] => mysql ) [AMPDBNAME] => Array ( [0] => text [1] => asterisk ) [AMPENGINE] => Array ( [0] => select [1] => asterisk ) [ASTMANAGERPORT] => Array ( [0] => int [1] => 5038 ) [ASTMANAGERHOST] => Array ( [0] => text [1] => localhost ) [AMPDBHOST] => Array ( [0] => text [1] => localhost ) [AMPDBUSER] => Array ( [0] => text [1] => asteriskuser ) [AMPDBPASS] => Array ( [0] => text [1] => amp109 ) [AMPMGRUSER] => Array ( [0] => text [1] => admin ) [AMPMGRPASS] => Array ( [0] => text [1] => amp111 ) [FOPPASSWORD] => Array ( [0] => text [1] => passw0rd ) [FOPSORT] => Array ( [0] => select [1] => extension ) [AMPSYSLOGLEVEL] => Array ( [0] => select [1] => FILE ) [NOOPTRACE] => Array ( [0] => int [1] => 1 ) [ARI_ADMIN_PASSWORD] => Array ( [0] => text [1] => ari_password ) [CFRINGTIMERDEFAULT] => Array ( [0] => select [1] => 0 ) [ASTETCDIR] => Array ( [0] => dir [1] => /etc/asterisk ) [ASTMODDIR] => Array ( [0] => dir [1] => /usr/lib/asterisk/modules ) [ASTVARLIBDIR] => Array ( [0] => dir [1] => /var/lib/asterisk ) [ASTAGIDIR] => Array ( [0] => dir [1] => /var/lib/asterisk/agi-bin ) [ASTSPOOLDIR] => Array ( [0] => dir [1] => /var/spool/asterisk/ ) [ASTRUNDIR] => Array ( [0] => dir [1] => /var/run/asterisk ) [ASTLOGDIR] => Array ( [0] => dir [1] => /var/log/asterisk ) [AMPBIN] => Array ( [0] => dir [1] => /var/lib/asterisk/bin ) [AMPSBIN] => Array ( [0] => dir [1] => /usr/sbin ) [AMPWEBROOT] => Array ( [0] => dir [1] => /var/www/html ) [FOPWEBROOT] => Array ( [0] => dir [1] => /var/www/html/panel ) [MOHDIR] => Array ( [0] => dir [1] => moh ) [FPBXDBUGFILE] => Array ( [0] => dir [1] => /tmp/freepbx_debug.log ) [USECATEGORIES] => Array ( [0] => bool [1] => 1 ) [ENABLECW] => Array ( [0] => bool [1] => 1 ) [CWINUSEBUSY] => Array ( [0] => bool [1] => 1 ) [FOPRUN] => Array ( [0] => bool [1] => 1 ) [AMPBADNUMBER] => Array ( [0] => bool [1] => 1 ) [DEVEL] => Array ( [0] => bool [1] => ) [DEVELRELOAD] => Array ( [0] => bool [1] => ) [CUSTOMASERROR] => Array ( [0] => bool [1] => 1 ) [DYNAMICHINTS] => Array ( [0] => bool [1] => ) [BADDESTABORT] => Array ( [0] => bool [1] => ) [SERVERINTITLE] => Array ( [0] => bool [1] => ) [USEDEVSTATE] => Array ( [0] => bool [1] => ) [MODULEADMINWGET] => Array ( [0] => bool [1] => ) [AMPDISABLELOG] => Array ( [0] => bool [1] => 1 ) [FOPDISABLE] => Array ( [0] => bool [1] => ) [CHECKREFERER] => Array ( [0] => bool [1] => 1 ) [RELOADCONFIRM] => Array ( [0] => bool [1] => 1 ) [DIVERSIONHEADER] => Array ( [0] => bool [1] => ) [ZAP2DAHDICOMPAT] => Array ( [0] => bool [1] => ) [XTNCONFLICTABORT] => Array ( [0] => bool [1] => ) [AMPENABLEDEVELDEBUG] => Array ( [0] => bool [1] => ) [DISABLECUSTOMCONTEXTS] => Array ( [0] => bool [1] => ) [TCINTERVAL] => Array ( [0] => int [1] => 60 ) [TCMAINT] => Array ( [0] => bool [1] => 1 ) [USEQUEUESTATE] => Array ( [0] => bool [1] => ) [DAYNIGHTTCHOOK] => Array ( [0] => bool [1] => ) [AMPMPG123] => Array ( [0] => bool [1] => 1 ) ) [db_conf_store] => [conf] => Array ( ) [asterisk_conf] => Array ( ) [last_update_status] => [_last_update_status] => [parsed_from_db] => [amportal_canwrite] => ) [type] => -> [args] => Array ( ) ) [2] => Array ( [file] => /var/www/html/admin/modules/framework/libfreepbx.install.php [line] => 400 [function] => create [class] => freepbx_conf [type] => :: [args] => Array ( ) ) [3] => Array ( [file] => /var/www/html/admin/modules/framework/upgrades/2.9.0alpha1/migrate_ampconf.php [line] => 76 [function] => freepbx_settings_init [args] => Array ( [0] => ) ) [4] => Array ( [file] => /var/www/html/admin/modules/framework/libfreepbx.install.php [line] => 353 [args] => Array ( [0] => /var/www/html/admin/modules/framework/upgrades/2.9.0alpha1/migrate_ampconf.php ) [function] => include ) [5] => Array ( [file] => /var/www/html/admin/modules/framework/libfreepbx.install.php [line] => 172 [function] => run_included [args] => Array ( [0] => /var/www/html/admin/modules/framework/upgrades//2.9.0alpha1/migrate_ampconf.php ) ) [6] => Array ( [file] => /var/www/html/admin/modules/framework/libfreepbx.install.php [line] => 109 [function] => install_upgrade [args] => Array ( [0] => 2.9.0alpha1 ) ) [7] => Array ( [file] => /var/www/html/admin/modules/framework/libfreepbx.install.php [line] => 76 [function] => run_upgrade [args] => Array ( [0] => Array ( [0] => 2.9.0alpha1 [1] => 2.9.0beta1 [2] => 2.9.0beta2 ) ) ) [8] => Array ( [file] => /var/www/html/admin/modules/framework/install.php [line] => 119 [function] => upgrade_all [args] => Array ( [0] => 2.9.0alpha0 ) ) [9] => Array ( [file] => /var/www/html/admin/functions.inc.php [line] => 3487 [args] => Array ( [0] => /var/www/html/admin/modules/framework/install.php ) [function] => include_once ) [10] => Array ( [file] => /var/www/html/admin/functions.inc.php [line] => 3459 [function] => _modules_doinclude [args] => Array ( [0] => /var/www/html/admin/modules/framework/install.php [1] => framework ) ) [11] => Array ( [file] => /var/www/html/admin/functions.inc.php [line] => 3156 [function] => _module_runscripts [args] => Array ( [0] => framework [1] => install ) ) [12] => Array ( [file] => /var/www/html/admin/page.modules.php [line] => 217 [function] => module_install [args] => Array ( [0] => framework ) ) [13] => Array ( [file] => /var/www/html/admin/config.php [line] => 363 [args] => Array ( [0] => /var/www/html/admin/page.modules.php ) [function] => include ) )

This is what I get when I try start FreePBX now:

FATAL ERROR
Unknown SQL engine: []
Trace Back
/var/www/html/admin/common/db_connect.php:57 die_freepbx()
[0]: Unknown SQL engine: []

/var/www/html/admin/bootstrap.php:66 require_once()
[0]: /var/www/html/admin/common/db_connect.php

/var/www/html/admin/config.php:58 require()
[0]: /var/www/html/admin/bootstrap.php

Any input will be greatly appreciated.

Thank you,
Vladimir

Vladmir,

as indicated in the ticket, the following indicates that something has already been done with this:

Checking for freepbx_settings table..exists
Add field sortorder to freepbx_settings..Done

what that means is that the migration process detected that the table already existed or it would have been created and initialized at that point.

the next message indicates that the sortorder field was added. We put that in the beta upgrade scripts as redundant so that the couple hundred very earlier testers would not have to go dropping the entire table to force an upgrade. The fact that you don’t have that field though also means that its been several revisions back when you first created that table because a new install creates the table with the sortorder field right away.

Given all that, it pretty much means that you need to drop the table and do a force install with install_amp telling it you are back around 2.8 so it re-runs all the migrations needed to bring everything up.

Hi, I have installed “iRedmail” and I get the follow Error when I have tried to enter via Web:

            FATAL ERROR
            fatal error reading freepbx_settings
            Trace Back
            /var/www/html/admin/libraries/freepbx_conf.class.php:217
             die_freepbx()
            [0]: fatal error reading freepbx_settings
            /var/www/html/admin/libraries/freepbx_conf.class.php:190
             freepbx_conf->__construct()
            /var/www/html/admin/bootstrap.php:81 freepbx_conf::create()
            /var/www/html/admin/config.php:61 require()
              [0]: /var/www/html/admin/bootstrap.php

I’ve already checked the database and “freepbx_settings” table DOES NOT EXIST ANYMORE, I have tried to figure out how to reinstall it, and I couldn’t.

Please any help will be appreciated.

Thanks!
Iván