chan-sccp / sccp_manager

SCCP Manager

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

14.4.0.1 error during upgrade

samam9911 opened this issue · comments

PDOException (42000)
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'IF EXISTS _description, DROP COLUMN IF EXISTS _loginname, DROP COLUMN IF EXISTS ' at line 1

I tried uninstalling the current module, downloading the 14.4.0.1 then install, still same error.
FreePBX 16.0.10.49
Current Asterisk Version: 18.6.0

sccp_manager must be installed from the console like that:
fwconsole ma download https://github.com/chan-sccp/sccp_manager/archive/refs/heads/develop.zip
fwconsole ma install sccp_manager
fwconsole reload

Update like this:
fwconsole ma upgrade sccp_manager
fwconsole reload

This is how it works for me for FreePBX 16.0.10.49, Asterisk 18.9.0
Installation and update via website from "Admin -> Module Admin" will fail

Thanks for the reply. I did try the install from the console and it failed, but downloaded it from module admin. I will try the download from the console, then install/update.
Do I need to install the software in certain folder, like /usr/src?

Still didn't work. Please see below:

fwconsole ma download https://github.com/chan-sccp/sccp_manager/archive/refs/heads/develop.zip

No repos specified, using: [standard,stable] from last GUI settings

Starting module download from https://github.com/chan-sccp/sccp_manager/archive/refs/heads/develop.zip ...
Processing
Downloading...
139/139 [============================] 100%
Finished downloading
Extracting...Done
Module https://github.com/chan-sccp/sccp_manager/archive/refs/heads/develop.zip successfully downloaded
Chowning directories...Done
[root@freepbx src]# fwconsole ma upgrade sccp_manager
No repos specified, using: [standard,stable] from last GUI settings

sccp_manager is the same as the online version, unable to upgrade
Updating Hooks...Done
Chowning directories...Done
[root@freepbx src]#
Module admin shows:
SCCP Manager14.3.0.30StableSteve Lad, Alex GPGPLDisabled; Pending Upgrade to 14.4.0.1

I also tried to uninstall current version then go to console and download/install from there and still failed with same error. Please see below:

fwconsole ma download https://github.com/chan-sccp/sccp_manager/archive/refs/heads/develop.zip

No repos specified, using: [standard,stable] from last GUI settings

Starting module download from https://github.com/chan-sccp/sccp_manager/archive/refs/heads/develop.zip ...
Processing
Downloading...
139/139 [============================] 100%
Finished downloading
Extracting...Done
Module https://github.com/chan-sccp/sccp_manager/archive/refs/heads/develop.zip successfully downloaded
Chowning directories...Done
[root@freepbx src]# fwconsole ma install sccp_manager
Updating tables sccpdevice, sccpline, sccpbuttonconfig, sccpdevmodel, sccpuser, sccpsettings...Done

  • Checking Asterisk Version : 18.6.0
  • Sccp model Compatible code : 433
  • Creating Config BackUp
  • Config backup created: /etc/asterisk/sccp_install_backup20220115081555.zip
  • Move Old Config
  • Saving legacy data into current column
  • In install.php line 440:

    SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error i
    n your SQL syntax; check the manual that corresponds to your MariaDB server
    version for the right syntax to use near 'IF EXISTS _description, DROP COL
    UMN IF EXISTS _loginname, DROP COLUMN IF EXISTS ' at line 1

    moduleadmin [-f|--force] [-d|--debug] [--edge] [--ignorecache] [--stable] [--color] [--skipchown] [-e|--autoenable] [--skipdisabled] [--snapshot SNAPSHOT] [--format FORMAT] [-R|--repo REPO] [-t|--tag TAG] [--skipbreakingcheck] [--sendemail] [--onlystdout] [--] []...

    [root@freepbx src]#

    Maybe you have too old version of MarialDB ...
    I'm sorry, but I don't know much about php and databases so I can't help much.

    I had no problems with such versions:

    Module Version Info
    extconfigs 13.2.0 Default Settings and Enums ver: 13.2.0
    dbinterface 14.0.0.1 Data access interface ver: 14.0.0.1
    aminterface 13.0.4 AMI data ver: 13.0.4
    XML 13.0.6 Create XML data interface ver: 13.0.6
    sccp_class 11.5 Sccp class Base ver: 11.5, Sccp ver: default
    Core_sccp 4.3.5 Sccp ver: 4.3.5 r433 Revision: 11090 Hash: 6ccfa00
    chan-sccp build info 4.3.5 Following options NOT built: devicestate; experimental
    Asterisk 18.9.0 Asterisk.
    DB Model 433 SCCP DB Configure
    TFTP Server atftp-0.7 (server) Mapping not available
    TFTP_Mapping off Mapping capability is not built into the TFTP server. To enable Provision, upgrade the TFTP server.
    Сompatible 433 Ok
    DB_Schema 433 Ok
    RealTime TEST OK No connector found for [sccp] : legacy valueUsing SCCP connection found to database: asterisk@localhost, with connector: [asterisk]
    PHP 7.4.3 OK
    MariaDb 15.1 mysql Ver 15.1 Distrib 10.3.32-MariaDB, for debian-linux-gnu (aarch64) using readline 5.2

    My MariaDb is 15.1 (same as yours). The only difference I see between your versions and mine is the Asterisk. Yours is 18.9 while mine is 18.6. I was on freepbx 15 and used the upgrade to go to 16 so had no choice of which Asterisk to use. Not sure if Asterisk has anything to do with the error since it's a SQL error on Drop column. But if there is a way to upgrade Asterisk, I will try and see if it makes a difference

    the new version 14.4.0.2 installed fine with no issues from the module admin. Thanks steve-lad