Critical error on install

I am installing freepbx on a clean install of Ubuntu 20.10. Using the guide at https://computingforgeeks.com/how-to-install-asterisk-16-with-freepbx-15-on-ubuntu-debian/. Everything went perfect untill i ran ./install -n.

[code] Setting FreePBX version to 15.0.16.60…Done
Writing out /etc/amportal.conf…Done
Chowning directories…
Taking too long? Customize the chown command, See http://wiki.freepbx.org/display/FOP/FreePBX+Chown+Conf
Setting Permissions…
Setting base permissions…Done
Setting specific permissions…
   0 [>---------------------------]
In Encoding.php line 196:
                                                                         
 Array and string offset access syntax with curly braces is deprecated   
                                                                         

chown [-f|–file FILE] [-m|–module MODULE]

In Process.php line 239:
                                                   
 The command “/usr/sbin/fwconsole chown” failed.   
                                                   
 Exit Code: 255(Unknown error)                     
                                                   
 Working directory: /usr/src/freepbx               
                                                   
 Output:                                           
 ================                                  
                                                   
                                                   
 Error Output:                                     
 ================                                  
                                                   

install [–dbengine DBENGINE] [–dbname DBNAME] [–dbhost DBHOST] [–cdrdbname CDRDBNAME] [–dbuser DBUSER] [–dbpass DBPASS] [–user US
ER] [–group GROUP] [–dev-links] [–skip-install] [–webroot WEBROOT] [–astetcdir ASTETCDIR] [–astmoddir ASTMODDIR] [–astvarlibdir A
STVARLIBDIR] [–astagidir ASTAGIDIR] [–astspooldir ASTSPOOLDIR] [–astrundir ASTRUNDIR] [–astlogdir ASTLOGDIR] [–ampbin AMPBIN] [–am
psbin AMPSBIN] [–ampcgibin AMPCGIBIN] [–ampplayback AMPPLAYBACK] [-r|–rootdb] [-f|–force][/code] is the error output from this command. I am not able to connect via web gui as i’m getting [code] Stack frames (5)

4

Whoops

\

Exception

\

ErrorException

/

var

/

www

/

html

/

admin

/

libraries

/

view.functions.php

15

3

Whoops

\

Run

handleError

/

var

/

www

/

html

/

admin

/

libraries

/

view.functions.php

15

2

frameworkPasswordCheck

/

var

/

www

/

html

/

admin

/

bootstrap.php

276

1

require_once

/

etc

/

freepbx.conf

9

0

include_once

/

var

/

www

/

html

/

admin

/

config.php

126[/code] with this highlighted in the page code 1. if(get_magic_quotes_gpc()) { 2. $nt->add_error('core', 'MQGPC', _("Magic Quotes GPC"), _("You have magic_quotes_gpc enabled in your php.ini, http or .htaccess file which will cause errors in some modules. FreePBX expects this to be off and runs under that assumption"));

Any suggestions? Asterisk itself is up and running, but fwconsole is not reponding to start, stop or restart.

Anyone? Anyone at all?

Looks like you are using an unsupported version of PHP.

I’m using 7.4.3, what is the highest php freepbx supports?

php 5.6 I think, at least that is what the FPBX distro is using. I think during Astricon someone said FPBX 16 may support php 7.x? But no date for that release yet?

Okay so downgraded to php 5.6.40 but am still getting the same error in terminal when running ./install -n

BlockquoteWriting out /etc/amportal.conf…Done
Chowning directories…
Taking too long? Customize the chown command, See http://wiki.freepbx.org/display/FOP/FreePBX+Chown+Conf
Setting Permissions…
Setting base permissions…Done
Setting specific permissions…
0 [>---------------------------]
In Encoding.php line 196:

Array and string offset access syntax with curly braces is deprecated

chown [-f|–file FILE] [-m|–module MODULE]

In Process.php line 239:

The command “/usr/sbin/fwconsole chown” failed.

Exit Code: 255(Unknown error)

Working directory: /usr/src/freepbx

Output:

Error Output:

and when trying to go to admin page i get the below instead:

Whoops \ Exception \ ErrorException (E_ERROR)

Undefined class constant ‘MYSQL_ATTR_INIT_COMMAND’ COPY

Click Here Report this to the PBX bug tracker

Stack frames (1)

0

Whoops

\

Exception

\

ErrorException

/

var

/

www

/

html

/

admin

/

libraries

/

BMO

/

Database.class.php

127
thats on the left on the right is :

/var/www/html/admin/libraries/BMO/Database.class.php

    // Always utf8.
    $charset = "utf8";
    if ($engine == 'mysql') {
        //we cant learn the server version BEFORE we connect. So we have to figure it out now
        $output = exec('mysql --version 2>/dev/null');
        if(preg_match('/Distrib\s*(\d+\.\d+\.\d+)/i',$output,$matches) && version_compare($matches[1],"5.5.3","ge")) {
            $charset = 'utf8mb4';
        }
    }

    $dsnarr['charset'] = isset($dsnarr['charset']) ? $dsnarr['charset'] : $charset;

    // Were there any database options?
    $options = isset($args[3]) ? $args[3] : array();
    $dsnarr['driverOptions'] = $options;

    //this id only for PDO
    if ($engine == 'mysql') {
        $options[\PDO::MYSQL_ATTR_INIT_COMMAND] = 'SET NAMES '.$charset;
    }

    // This DSN array is now suitable for building into a valid DSN!
    $this->dsn = "$engine:";
    foreach ($dsnarr as $k=>$v) {
        if (is_string($v)) {
            $this->dsn .= "$k=$v;";
        }
    }

    try {
        if ($options) {
            parent::__construct($this->dsn, $username, $password, $options);
        } else {
            parent::__construct($this->dsn, $username, $password);
        }
    } catch(\Exception $e) {
        die_freepbx($e->getMessage(), $e);
    }
    if(defined('LOGQUERIES')) {

Arguments
“Undefined class constant ‘MYSQL_ATTR_INIT_COMMAND’”

Blockquote

Did you actually remove the other PHP version? if not then you will need to set PHP 5.6 as the active version.

yes php 5.6 was set to active and apache was restarted. the php info page reflects the currently used version as 5.6

the main issue i think is in the console read out. I understand the right php has to get used as the scripts are php based. but i can’t succefully run the ./install -n command. It’s telling me there is an error but not giving me any logs to find and correct it.

Note @billsimon has put in a bunch of time, I believe 15 supports up to 7.3 excluding commercial modules.

I have tried 7.3 as well with no luck being able to run the ./install -n

Verify you are using the correct version at the console also - sometimes they are not matched. php -v will show you.

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.