Uploaded image for project: 'FreePBX'
  1. FreePBX
  2. FREEPBX-13644

FreePBX 13 + MySQL >= 5.7.5 doesn't write *_additional.conf files.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 13
    • Fix Version/s: 14
    • Component/s: Core, Follow Me, RESTful API
    • Labels:
      None
    • ToDo:
    • Asterisk Version:
      13
    • Distro Version:
      8.6 (Jessie)
    • Distro:
      Self Install Debian

      Description

      When using FreePBX 13 on MySQL 5.7.16, it fails to write the asterisk config files. It stops writing them when trying to write sip_additional.conf.

      The problem lies in ./modules/core/functions.inc.php . There are several SQL queries like:
      $sql = "SELECT data,id from $table_name where keyword='account' and flags <> 1 group by data";

      On MySQL versions <5.7.5 that "group by" clause was accepted, but on newer versions it fails with the following error:

      ERROR 1055 (42000): Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'asterisk.sip.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by

      (more info in https://dev.mysql.com/doc/refman/5.7/en/group-by-handling.html )

      The fix suggested in dev.mysql.com is changing

      $sql = "SELECT data,id from $table_name where keyword='account' and flags <> 1 group by data";

      to

      $sql = "SELECT data,ANY_VALUE(id) as id from $table_name where keyword='account' and flags <> 1 group by data";

      I've done that in generate_sip_additional, generate_iax_additional and generate_zapata_additional and it works flawlessly.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                khong Kent Hong [X] (Inactive)
                Reporter:
                ezanardi Enrique Zanardi
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  NextupJiraPlusStatus

                  Error rendering 'slack.nextup.jira:nextup-jira-plus-status'. Please contact your Jira administrators.