1
votes

Since I don't receive the confirmation mail from the freepbx community I'm forced to post my question here.

As the title says I'm trying to install freepbx. The error message is: Error! Error communicating with Asterisk.Ensure that Asterisk is properly installed as the asterisk user Asterisk appears to be running as asterisk Try starting Asterisk with the './start_asterisk start' command in this directory

Note that I have actually run ./start_asterisk start and got this error message.

Obviously I can run asterisk as the user asterisk so the problem probably isn't the permissions.

I've tried with starting asterisk as a daemon on the user asterisk but I still get the same error message.

I have installed all dependencies listed on https://wiki.freepbx.org/display/FOP/Installing+FreePBX+13+on+Ubuntu+Server+14.04.2+LTS

but instead of php5 I've installed php7.0 which should be compatible with freepbx 14.

I don't know what else to tell so if something is unclear ask me. I hope you guys can help me.


EDIT:

I've managed to get past this problem. I've discovered this page: https://antonraharja.com/2016/03/12/asterisk-13-and-freepbx-13-on-ubuntu-14-04/ and did the missing steps.

I also had to create an asterisk folder in the home directory and gave asterisk ownership. running ./install -n again I get this error message:

[Doctrine\DBAL\Exception\DriverException] An exception ocurred while executing 'CREATE TABLE freepbx_log (id INT AUTO_INCREMET NOT NULL, time DATETIME DEFAULT '0000-00-00 00:00:00' NOT NULL, section VARCHAR(50) DEFAULT NULL, level VARCHAR(255) DEFAULT 'error' NOT NULL, status INT DEFAULT 0 NOT NULL. message LONGTEXT NOT NULL, INDEX time(time,level), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4 COLLATE utf8mb4_uni code_ci ENGINE = InnoDB': SQLSTATE[42000] Syntax error or access violation: 1067 Invalid default value for 'time'

I still want to install freepbx. Is this possible or is this error a bug?

2

2 Answers

0
votes

I finished to install freepbx14 with ubuntu 16.04. The problem with the sql error you got is discussed here (not freepbx). https://github.com/laravel/framework/issues/3602

I decided to try something similar (change the mysql mode). This shouldnt be the final solution, in my opinion, but you can install freepbx for now. Maybe the freepbx developers should check, if it is possible to change the default value to something other than "0000-00-00 00:00:00" which since (mysql 5.7) is not longer considered as valid date.

Quote from laravel issue tracker::

for the issue with strict mode true , check
https://laravel.com/docs/5.3/upgrade#upgrade-5.2.0

MySQL Dates

Starting with MySQL 5.7, 0000-00-00 00:00:00 is no longer considered a valid date, since strict mode is enabled by default. All timestamp columns should receive a valid default value when you insert records into your database. You may use the useCurrent method in your migrations to default the timestamp columns to the current timestamps, or you may make the timestamps nullable to allow null values:

$table->timestamp('foo')->nullable();

$table->timestamp('foo')->useCurrent();

$table->nullableTimestamps();
kinda dump that something like that wasnt properly documented

"Solution":

add to /etc/mysql/mysql.conf.d/mysql.conf in the [mysql] section:

sql_mode=ONLY_FULL_GROUP_BY,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

This will override the default mysql strict settings, which include two other options: NO_ZERO_IN_DATE,NO_ZERO_DATE

restart mysqld
and
install freepbx14

have fun :-)

Btw. did you manage to use php7 instead of 5.6 with ppa? Thx

0
votes

Asterisk does not support PHP 7 at the moment. that is according the their developers.

Check this page: https://community.freepbx.org/t/cant-connect-to-online-mirrors-php7/42730

to install downgrade to PHP 5.6