1

What am I doing wrong? Keep receiving an error message whenever I try to install iATS extension. Can anyone suggest please? Thanks

https://pastebin.com/4BkQErA8

Backtrace:

>      [info] $backTrace = #0 /home/webadmin/public_html/cmm-uat/sites/all/modules/civicrm/CRM/Core/Error.php(952):
> CRM_Core_Error::backtrace("backTrace", TRUE)
> #1 /home/webadmin/public_html/cmm-uat/sites/all/modules/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(922):
> CRM_Core_Error::exceptionHandler(Object(DB_Error))
> #2 /home/webadmin/public_html/cmm-uat/sites/all/modules/civicrm/packages/DB.php(985):
> PEAR_Error->__construct("DB Error: already exists", -5, 16, (Array:2),
> "CREATE TABLE `civicrm_iats_customer_codes` (\n  `id` int unsigned NOT
> NULL AU...")
> #3 /home/webadmin/public_html/cmm-uat/sites/all/modules/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(575):
> DB_Error->__construct(-5, 16, (Array:2), "CREATE TABLE
> `civicrm_iats_customer_codes` (\n  `id` int unsigned NOT NULL AU...")
> #4 /home/webadmin/public_html/cmm-uat/sites/all/modules/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(223):
> PEAR->_raiseError(Object(DB_mysqli), NULL, -5, 16, (Array:2), "CREATE
> TABLE `civicrm_iats_customer_codes` (\n  `id` int unsigned NOT NULL
> AU...", "DB_Error", TRUE)
> #5 /home/webadmin/public_html/cmm-uat/sites/all/modules/civicrm/packages/DB/common.php(1907):
> PEAR->__call("raiseError", (Array:7))
> #6 /home/webadmin/public_html/cmm-uat/sites/all/modules/civicrm/packages/DB/mysqli.php(933):
> DB_common->raiseError(-5, NULL, NULL, "CREATE TABLE
> `civicrm_iats_customer_codes` (\n  `id` int unsigned NOT NULL AU...",
> "1050 ** Table 'civicrm_iats_customer_codes' already exists")
> #7 /home/webadmin/public_html/cmm-uat/sites/all/modules/civicrm/packages/DB/mysqli.php(403):
> DB_mysqli->mysqliRaiseError()
> #8 /home/webadmin/public_html/cmm-uat/sites/all/modules/civicrm/packages/DB/common.php(1216):
> DB_mysqli->simpleQuery("CREATE TABLE `civicrm_iats_customer_codes` (\n
> `id` int unsigned NOT NULL AU...")
> #9 /home/webadmin/public_html/cmm-uat/sites/all/modules/civicrm/CRM/Utils/File.php(366):
> DB_common->query("CREATE TABLE `civicrm_iats_customer_codes` (\n  `id`
> int unsigned NOT NULL AU...")
> #10 /home/webadmin/public_html/cmm-uat/sites/all/modules/civicrm/CRM/Utils/File.php(326):
> CRM_Utils_File::runSqlQuery("mysql://webadmin_uatusr:GouraNga08@localhost:3306/webadmin_uat_crm?new_link=true",
> "-- install sql for iATS Services extension, create a table to hold
> custom cod...", NULL, TRUE)
> #11 /home/webadmin/public_html/cmm-uat/sites/all/modules/civicrm/ext/iatspayments/CRM/iATS/Upgrader/Base.php(119):
> CRM_Utils_File::sourceSQLFile("mysql://webadmin_uatusr:GouraNga08@localhost:3306/webadmin_uat_crm?new_link=true",
> "/home/webadmin/public_html/cmm-uat/sites/all/modules/civicrm/ext/iatspayments...")
> #12 /home/webadmin/public_html/cmm-uat/sites/all/modules/civicrm/ext/iatspayments/CRM/iATS/Upgrader.php(28):
> CRM_iATS_Upgrader_Base->executeSqlFile("sql/install.sql")
> #13 /home/webadmin/public_html/cmm-uat/sites/all/modules/civicrm/ext/iatspayments/CRM/iATS/Upgrader/Base.php(264):
> CRM_iATS_Upgrader->install()
> #14 /home/webadmin/public_html/cmm-uat/sites/all/modules/civicrm/ext/iatspayments/iats.civix.php(50):
> CRM_iATS_Upgrader_Base->onInstall()
> #15 /home/webadmin/public_html/cmm-uat/sites/all/modules/civicrm/ext/iatspayments/iats.php(48): _iats_civix_civicrm_install()
> #16 /home/webadmin/public_html/cmm-uat/sites/all/modules/civicrm/CRM/Extension/Manager/Module.php(76):
> iats_civicrm_install()
> #17 /home/webadmin/public_html/cmm-uat/sites/all/modules/civicrm/CRM/Extension/Manager/Module.php(48):
> CRM_Extension_Manager_Module->callHook(Object(CRM_Extension_Info),
> "install")
> #18 /home/webadmin/public_html/cmm-uat/sites/all/modules/civicrm/CRM/Extension/Manager.php(237):
> CRM_Extension_Manager_Module->onPreInstall(Object(CRM_Extension_Info))
> #19 /home/webadmin/public_html/cmm-uat/sites/all/modules/civicrm/api/v3/Extension.php(58):
> CRM_Extension_Manager->install((Array:1))
> #20 /home/webadmin/public_html/cmm-uat/sites/all/modules/civicrm/Civi/API/Provider/MagicFunctionProvider.php(101):
> civicrm_api3_extension_install((Array:2))
> #21 /home/webadmin/public_html/cmm-uat/sites/all/modules/civicrm/Civi/API/Kernel.php(168):
> Civi\API\Provider\MagicFunctionProvider->invoke((Array:9))
> #22 /home/webadmin/public_html/cmm-uat/sites/all/modules/civicrm/Civi/API/Kernel.php(99):
> Civi\API\Kernel->runRequest((Array:9))
> #23 /home/webadmin/public_html/cmm-uat/sites/all/modules/civicrm/api/api.php(43):
> Civi\API\Kernel->runSafe("Extension", "install", (Array:2))
> #24 /home/webadmin/public_html/cmm-uat/sites/all/modules/civicrm/CRM/Admin/Form/Extensions.php(189):
> civicrm_api3("Extension", "install", (Array:2))
> #25 /home/webadmin/public_html/cmm-uat/sites/all/modules/civicrm/CRM/Core/Form.php(490):
> CRM_Admin_Form_Extensions->postProcess()
> #26 /home/webadmin/public_html/cmm-uat/sites/all/modules/civicrm/CRM/Core/StateMachine.php(160):
> CRM_Core_Form->mainProcess()
> #27 /home/webadmin/public_html/cmm-uat/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Next.php(61): CRM_Core_StateMachine->perform(Object(CRM_Admin_Form_Extensions),
> "next", "Next")
> #28 /home/webadmin/public_html/cmm-uat/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php(203):
> CRM_Core_QuickForm_Action_Next->perform(Object(CRM_Admin_Form_Extensions),
> "next")
> #29 /home/webadmin/public_html/cmm-uat/sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php(103):
> HTML_QuickForm_Controller->handle(Object(CRM_Admin_Form_Extensions),
> "next")
> #30 /home/webadmin/public_html/cmm-uat/sites/all/modules/civicrm/CRM/Core/Controller.php(349):
> HTML_QuickForm_Page->handle("next")
> #31 /home/webadmin/public_html/cmm-uat/sites/all/modules/civicrm/CRM/Core/Page/Basic.php(411):
> CRM_Core_Controller->run()
> #32 /home/webadmin/public_html/cmm-uat/sites/all/modules/civicrm/CRM/Core/Page/Basic.php(156):
> CRM_Core_Page_Basic->edit(1, NULL)
> #33 /home/webadmin/public_html/cmm-uat/sites/all/modules/civicrm/CRM/Admin/Page/Extensions.php(121):
> CRM_Core_Page_Basic->run()
> #34 /home/webadmin/public_html/cmm-uat/sites/all/modules/civicrm/CRM/Core/Invoke.php(311):
> CRM_Admin_Page_Extensions->run((Array:3), NULL)
> #35 /home/webadmin/public_html/cmm-uat/sites/all/modules/civicrm/CRM/Core/Invoke.php(85):
> CRM_Core_Invoke::runItem((Array:16))
> #36 /home/webadmin/public_html/cmm-uat/sites/all/modules/civicrm/CRM/Core/Invoke.php(52):
> CRM_Core_Invoke::_invoke((Array:3))
> #37 /home/webadmin/public_html/cmm-uat/sites/all/modules/civicrm/drupal/civicrm.module(444):
> CRM_Core_Invoke::invoke((Array:3))
> #38 /home/webadmin/public_html/cmm-uat/includes/menu.inc(527): civicrm_invoke("admin", "extensions")
> #39 /home/webadmin/public_html/cmm-uat/index.php(21): menu_execute_active_handler()
6

Looks like you had already installed the extension on your instance (and removed it without properly uninstalling it*). The table 'civicrm_iats_customer_codes' already exists in your database. You can delete the table from if it doesn't have any data in it or change the sql statement in extension code to use 'CREATE IF NOT EXISTS'

HTH

Pradeep

KarinG: *if you properly uninstall the iATS Extension - the uninstall process will copy your civicrm_iats_customer_codes to a backup table for safe keeping before deleting that table;

| improve this answer | |
  • Thanks! after deleting iats tables I was able to reinstall. – Tapash Jun 20 '19 at 12:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.