D
dburson

  • May 1, 2023
  • Joined Apr 13, 2014
  • 1 best answer
  • After looking at further log files I found the issue:
    [CREATE TABLEost_plugin_instance(idint(11) unsigned NOT NULL AUTO_INCREMENT,plugin_idint(11) unsigned NOT NULL,flagsint(10) NOT NULL DEFAULT 0,namevarchar(128) NOT NULL DEFAULT '',configtext DEFAULT NULL,notestext DEFAULT NULL,createddatetime NOT NULL,updateddatetime DEFAULT NULL, PRIMARY KEY (id), KEYplugin_id(plugin_id) ) DEFAULT CHARSET=utf8] Table 'ost_plugin_instance' already exists

    I ended up making my backups, disabling all plugins that I had, followed by deleting them from the web interface.
    I then dropped the ost_plugin_instance from my database and ran the update.

    Successful on the first try.

    Just wanted to make sure I answered my own issue with the resolution.

  • Thank you, I'll look back through the log files and see if I can find anything logged. The admin console shows several completed updates up to 1.17.3, then the fatal error that isn't really listed, just the stack trace.

    Hopefully I can get this done before we migrate our systems to Microsoft 365.

  • Hello, I'm running into an issue upgrading one of my helpdesks.
    I have ran the update on another helpdesk that was exactly the same base files successfully, so I am stumped why this other helpdesk is not working.

    System Info:
    Running on Server 2019, IIS 10.0.17763.1
    PHP7.3.21 - migrating to 8.1.16
    MySQL 8.0.19

    When doing the upgrade there are no plugins as I have disabled them, then deleted them from the web interface, then physically removed the files after uploading the new files to the web folder.

    I get green check boxes on the upgrade page, however I get the following stack trace:

    [19-Apr-2023 19:56:35 UTC] PHP Fatal error: Uncaught InconsistentModelException: Unable to prepare query: SELECT A1.* FROMost_email_accountA1 WHERE A1.type= 'smtp' AND A1.type= 'smtp' AND A1.email_id= 1 in C:\inetpub\wwwroot\helpdesk\include\class.orm.php:3483
    Stack trace:
    #0 C:\inetpub\wwwroot\helpdesk\include\class.orm.php(3529): MySqlExecutor->execute()
    #1 C:\inetpub\wwwroot\helpdesk\include\class.orm.php(2010): MySqlExecutor->getArray()
    #2 C:\inetpub\wwwroot\helpdesk\include\class.orm.php(2054): ModelInstanceManager->{closure}()
    #3 C:\inetpub\wwwroot\helpdesk\include\class.orm.php(2033): CallbackSimpleIterator->next()
    #4 C:\inetpub\wwwroot\helpdesk\include\class.orm.php(2042): CallbackSimpleIterator->rewind()
    #5 C:\inetpub\wwwroot\helpdesk\include\class.orm.php(1713): CallbackSimpleIterator->valid()
    #6 C:\inetpub\wwwroot\helpdesk\include\class.orm.php(1723): CachedResultSet->fillTo()
    #7 C:\inetpub\wwwroot\helpdesk\include\class.orm.php(1337): CachedResultSet->asArray()
    #8 C:\inetpub\wwwroot\helpdesk\include\class.orm.php(1360): QuerySet->all()
    #9 C:\inetpub\wwwroot\helpdesk\include\class.orm.php(606): QuerySet->one()
    #10 C:\inetpub\wwwroot\helpdesk\include\class.orm.php(381): VerySimpleModel::lookup()
    #11 C:\inetpub\wwwroot\helpdesk\include\class.orm.php(417): VerySimpleModel->get()
    #12 C:\inetpub\wwwroot\helpdesk\include\class.email.php(210): VerySimpleModel->__get()
    #13 C:\inetpub\wwwroot\helpdesk\include\class.mailer.php(35): Email->getSmtpAccount()
    #14 C:\inetpub\wwwroot\helpdesk\include\class.email.php(231): osTicket\Mail\Mailer->__construct()
    #15 C:\inetpub\wwwroot\helpdesk\include\class.email.php(245): Email->send()
    #16 C:\inetpub\wwwroot\helpdesk\include\class.upgrader.php(204): Email->sendAlert()
    #17 C:\inetpub\wwwroot\helpdesk\include\class.setup.php(115): StreamUpgrader->onError()
    #18 C:\inetpub\wwwroot\helpdesk\include\class.setup.php(69): SetupWizard->abort()
    #19 C:\inetpub\wwwroot\helpdesk\include\class.setup.php(44): SetupWizard->load_sql()
    #20 C:\inetpub\wwwroot\helpdesk\include\class.upgrader.php(379): SetupWizard->load_sql_file()
    #21 C:\inetpub\wwwroot\helpdesk\include\class.upgrader.php(112): StreamUpgrader->upgrade()
    #22 C:\inetpub\wwwroot\helpdesk\include\ajax.upgrader.php(42): Upgrader->upgrade()
    #23 C:\inetpub\wwwroot\helpdesk\include\class.dispatcher.php(153): UpgraderAjaxAPI->upgrade()
    #24 C:\inetpub\wwwroot\helpdesk\include\class.dispatcher.php(40): UrlMatcher->dispatch()
    #25 C:\inetpub\wwwroot\helpdesk\scp\ajax.php(327): Dispatcher->resolve()
    #26 {main}
    thrown in C:\inetpub\wwwroot\helpdesk\include\class.orm.php on line 3483

    Thank you in advance for any assistance you may provide.

    • KevinTheJedi replied to this.
    • After looking at further log files I found the issue:
      [CREATE TABLEost_plugin_instance(idint(11) unsigned NOT NULL AUTO_INCREMENT,plugin_idint(11) unsigned NOT NULL,flagsint(10) NOT NULL DEFAULT 0,namevarchar(128) NOT NULL DEFAULT '',configtext DEFAULT NULL,notestext DEFAULT NULL,createddatetime NOT NULL,updateddatetime DEFAULT NULL, PRIMARY KEY (id), KEYplugin_id(plugin_id) ) DEFAULT CHARSET=utf8] Table 'ost_plugin_instance' already exists

      I ended up making my backups, disabling all plugins that I had, followed by deleting them from the web interface.
      I then dropped the ost_plugin_instance from my database and ran the update.

      Successful on the first try.

      Just wanted to make sure I answered my own issue with the resolution.

    • No, the error stops.
      Also stops when disabling audit, and keeping autocloser on.

    • Hello,

      I am using the autocloser plugin by Grizly from https://github.com/clonemeagain/plugin-autocloser
      I am also using the current version of OsTicket plugin - Audit.phar

      When both plugins are active I receive the following PHP Fatal error, and stack trace.
      Server Info: Microsoft Windows Server 2019
      osTicket Version v1.14.3
      Web Server Software: Microsoft-IIS/10.0
      MySQL Version: 8.0.19
      PHP Version: 7.3.15

      PHP Fatal error: Uncaught Error: Call to a member function getName() on null in phar://C:/inetpub/wwwroot/helpdesk/include/plugins/audit.phar/class.audit.php:746
      Stack trace:
      #0 C:\inetpub\wwwroot\helpdesk\include\class.signal.php(98): AuditEntry::auditObjectEvent(Object(ConfigItem), Array)
      #1 C:\inetpub\wwwroot\helpdesk\include\class.config.php(124): Signal::send('object.edited', Object(ConfigItem), Array)
      #2 C:\inetpub\wwwroot\helpdesk\include\class.config.php(81): Config->update('last-run', 1598211725)
      #3 C:\inetpub\wwwroot\helpdesk\include\plugins\autocloser\class.CloserPlugin.php(188): Config->set('last-run', 1598211725)
      #4 C:\inetpub\wwwroot\helpdesk\include\plugins\autocloser\class.CloserPlugin.php(79): CloserPlugin->is_time_to_run(Object(CloserPluginConfig))
      #5 C:\inetpub\wwwroot\helpdesk\include\plugins\autocloser\class.CloserPlugin.php(68): CloserPlugin->logans_run_mode()
      #6 C:\inetpub\wwwroot\helpdesk\include\class.signal.php(98): CloserPlugin->{closure}(NULL, Array)
      #7 C:\inetpub\wwwroot\helpdesk\include\class.cro in phar://C:/inetpub/wwwroot/helpdesk/include/plugins/audit.phar/class.audit.php on line 746

    • Did you set up a CNAME in your DNS?
      Right click - Create new alias (CNAME)
      Type the name of the alias (such as support)
      For the FQDN, select Browse, and double click your DNS server name, forward lookup zone, (domain.com), then select your server from DNS.