Author Topic: Upgrade error 1.2.2  (Read 7330 times)

Offline stronso

  • Newbie
  • *
  • Posts: 13
  • Karma: +2/-0
    • View Profile
Upgrade error 1.2.2
« on: August 11, 2015, 12:19:39 AM »
Hi,

This is my first post. I can't upgrade from 1.2.1 to 1.2.2.  I've read the forums here about alternatives to Dashboard upgrades, checking user settings, mysql vs amysqli, upgrade manually, then run "upgrade.sql" via phpMyAdmin, etc., but nothing has worked for me.

I get different errors in my log based on each attempt.  Here is the latest log after re-attempting via the Dashboard:

2015-08-11 4:07:15 - database error: AbanteCart core v.1.2.1 Error:
ALTER TABLE `abc_product_options`
ADD `settings` text COLLATE utf8_general_ci;
in <b>/home/stronso/public_html/core/database/amysqli.php</b> on line <b>105</b>

I hope someone can identify the issue. I'm enjoying the experience with Abantecart so far, and hope to continue using it and get the latest upgrade to 1.2.3 now that it's available.

Thanks.

yonghan

  • Guest
Re: Upgrade error 1.2.2
« Reply #1 on: August 11, 2015, 02:45:31 AM »
Hi,  based on the error log, it's the table prefix who cause the error. Please try to change your table prefix from abc to ac via phpmyadmin. Please check this http://support.hostgator.com/articles/specialized-help/technical/phpmyadmin/how-to-rename-database-tables-in-phpmyadmin on how to do it. After done with changing the preifx, login to your cpanel,look for config.php under system, open and change

from

Code: [Select]
define('DB_PREFIX', 'abc_');
to

Code: [Select]
define('DB_PREFIX', 'ac_');
Finally please try to run the upgrade again and don't forget to backup your database. Hope it works for you. :)

Offline stronso

  • Newbie
  • *
  • Posts: 13
  • Karma: +2/-0
    • View Profile
Re: Upgrade error 1.2.2
« Reply #2 on: August 12, 2015, 11:49:39 PM »
Hi Handoyo,

Thanks for your reply. I finally had a chance to try this, but it didn't work.
I changed the prefix as you suggested, but once I tried to run the upgrade via the Dashboard it took me to the "Critical Error" default page. 

I thought it may be because I had to change the prefix in the "config.php" file as well, but I tried again and got the same critical error page.

I logged back in and it still shows Abantecart 1.2.1.

What if I try to do a completely fresh install of 1.2.3, then once the new database is created, drop it, and import the previous database?
I understand I'll have to change the salt key, and other settings in "config.php", etc. I'm just wondering if this is a good workaround for whatever is causing these upgrade errors.

Let me know what you think.

Thanks.

Offline stronso

  • Newbie
  • *
  • Posts: 13
  • Karma: +2/-0
    • View Profile
Re: Upgrade error 1.2.2
« Reply #3 on: August 13, 2015, 12:00:57 AM »
Here are the latest error logs:

2015-08-13 3:34:27 - database error: AbanteCart core v.1.2.1 Error:
SELECT se.`key`, se.`value`, st.store_id
FROM abc_settings se
RIGHT JOIN abc_stores st ON se.store_id=st.store_id
LEFT JOIN abc_extensions e ON TRIM(se.`group`) = TRIM(e.`key`)
WHERE se.store_id = 0 AND st.status = 1 AND e.extension_id IS NULL in <b>/home/stronso/public_html/core/database/amysqli.php</b> on line <b>105</b>

2015-08-13 3:34:31 - database error: AbanteCart core v.1.2.1 Error:
SELECT se.`key`, se.`value`, st.store_id
FROM abc_settings se
RIGHT JOIN abc_stores st ON se.store_id=st.store_id
LEFT JOIN abc_extensions e ON TRIM(se.`group`) = TRIM(e.`key`)
WHERE se.store_id = 0 AND st.status = 1 AND e.extension_id IS NULL in <b>/home/stronso/public_html/core/database/amysqli.php</b> on line <b>105</b>

2015-08-13 3:37:57 - database error: AbanteCart core v.1.2.1 Error:
ALTER TABLE `ac_product_options`
ADD `settings` text COLLATE utf8_general_ci;
in <b>/home/stronso/public_html/core/database/amysqli.php</b> on line <b>105</b>

yonghan

  • Guest
Re: Upgrade error 1.2.2
« Reply #4 on: August 13, 2015, 12:12:04 AM »
I suppose it's because of the table prefix changes that cause the error.

I do think doing the fresh install is the best workaround,  and I suggest you to import the data instead of reimport the whole table as there are several database schema changes. I'm afraid you will get an error after reimport the previous database.

Offline stronso

  • Newbie
  • *
  • Posts: 13
  • Karma: +2/-0
    • View Profile
Re: Upgrade error 1.2.2
« Reply #5 on: August 13, 2015, 12:51:57 AM »
Thanks, Handoyo, again for the reply.

I'll try the fresh install workaround.

Just to clarify since I'm a newbie at this, importing the data as you suggest instead of full database import, means I manually import the old data into the new database tables, correct? I assume it will be easy to see the corresponding tables via phpMyAdmin in the new database. Or is the new schema very much different?

If it's confusing, do you think I should do a fresh install on a sub-directory and test it before moving it to the root folder?  Does moving the site from a sub directory to the root directory cause any problems with future upgrades? That's what I did while I was testing & configuring Abantecart, and ever since I haven't been able to upgrade once I moved to the root folder.

Offline llegrand

  • Hero Member
  • *****
  • Posts: 1798
  • Karma: +520/-7
    • View Profile
Re: Upgrade error 1.2.2
« Reply #6 on: August 13, 2015, 01:07:42 AM »
Hi, 
the error you are reporting would suggest that you did NOT change the database prefix by using phpMyAdmin.

select the database (the entire database)  scroll down to the bottom of the long list of files,
select all the tables,  and from the dropdown  select  Change Prefix

old prefix is abc_
new prefix is ac_

Change the database prefix in the file   System/config.php   to the new ac_

Then re-do the update.  It should run okay then.  By changing the prefix of the database to ac_ now -  it will help with future updates.

This is probably the easiest way to get things going again and make future updates work.

If this doesn't work for you,  then we can assist you in a clean install and importing your data - but that's more work.

Lee



Offline stronso

  • Newbie
  • *
  • Posts: 13
  • Karma: +2/-0
    • View Profile
Re: Upgrade error 1.2.2
« Reply #7 on: August 13, 2015, 11:58:13 AM »
Thanks, llegrand, for the comment.

I noted that, too, but I think that was the error log when I tried changing the prefix in the database and forgot to change it in config.php.
I changed the prefix in config.php from "abc_" to "ac_" and tried the install again and got the same "critical error" default page after re-attempting the update.

I'll try again, though, making sure to refresh the browser to clear out any residue of the old prefix.  I'll let you know if it works.

Offline stronso

  • Newbie
  • *
  • Posts: 13
  • Karma: +2/-0
    • View Profile
Re: Upgrade error 1.2.2
« Reply #8 on: August 14, 2015, 01:07:46 PM »
Okay, tried changing the prefix to "ac_", logged out, refreshed everything, and tried the install and no luck.

Here are the latest error logs:

2015-08-13 3:37:57 - database error: AbanteCart core v.1.2.1 Error:
ALTER TABLE `ac_product_options`
ADD `settings` text COLLATE utf8_general_ci;
in <b>/home/stronso/public_html/core/database/amysqli.php</b> on line <b>105</b>

2015-08-13 20:00:02 - warning: AbanteCart core v.1.2.1 preg_grep() [<a href='function.preg-grep'>function.preg-grep</a>]: Compilation failed: nothing to repeat at offset 0 in <b>/home/stronso/public_html/core/engine/language.php</b> on line <b>283</b>

2015-08-13 20:00:07 - warning: AbanteCart core v.1.2.1 preg_grep() [<a href='function.preg-grep'>function.preg-grep</a>]: Compilation failed: nothing to repeat at offset 0 in <b>/home/stronso/public_html/core/engine/language.php</b> on line <b>283</b>

Any suggestions before trying the fresh install on a sub-directory for testing before moving to the root?

Offline weming

  • Newbie
  • *
  • Posts: 9
  • Karma: +1/-0
    • View Profile
Re: Upgrade error 1.2.2
« Reply #9 on: April 16, 2018, 10:41:55 AM »
Hi , any solution ? i facing the same problem

this is my error code

2018-04-16 14:34:11 - database error: AbanteCart core v.1.2.1 Error:
SELECT se.`key`, se.`value`, st.store_id
FROM shr_settings se
RIGHT JOIN shr_stores st ON se.store_id=st.store_id
LEFT JOIN shr_extensions e ON TRIM(se.`group`) = TRIM(e.`key`)
WHERE se.store_id = 0 AND st.status = 1 AND e.extension_id IS NULL in <b>/home/ws/public_html/xxxx.com/core/database/amysqli.php</b> on line <b>105</b>


2018-04-16 14:38:22 - database error: AbanteCart core v.1.2.1 Error:
SHOW TABLES FROM `ws_shr81` in <b>/home/ws/public_html/xxxx.com/core/database/amysqli.php</b> on line <b>105</b>

Offline abolabo

  • core-developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2046
  • Karma: +318/-13
  • web for all, all for web!
    • View Profile
    • AbanteCart
Re: Upgrade error 1.2.2
« Reply #10 on: April 17, 2018, 02:38:57 AM »


please try to run this query
Code: [Select]
SHOW TABLES FROM `ws_shr81` in phpMyAdmin

Looks like something wrong with your database credentials from /system/config.php file
“No one is useless in this world who lightens the burdens of another.”
― Charles Dickens

 

Powered by SMFPacks Social Login Mod