Author Topic: Error while sending QUERY packet when trying to upgrade from 1.2.4 -> 1.2.5  (Read 8736 times)

Offline webdevmerc

  • Full Member
  • ***
  • Posts: 172
  • Karma: +32/-1
    • View Profile
Been hammering away trying to figure out what is causing the auto webUI upgrade to fail and I'm still stuck.  I'm wondering if anyone had any ideas to try or ran into this as well...I tried changing my various php.ini settings to

mysql.connect_timeout = 14400;
default_socket_timeout = 14400;

but it didn't seem to fix it.  I'm wondering if it's some other timeout problem causing the error or max_packets or something else as it does work occasionally.


What's strange is if I try again or blow away my test environment, restore, try again, it would generally work the 2nd time I try the webui upload install on my test environment pretty consistently so it's not failing all the time (NEVER WORKS ON THE 1ST TRY THOUGH).  When I tried it in production, it never worked however, even on multiple attempts.


It's throwing off this error:

tail -f error.txt
2016-01-29 15:20:59 - warning:  AbanteCart core v.1.2.4 Error while sending QUERY packet. PID=43628 in <b>/home/webdevmerc/tst/core/database/amysqli.php</b> on line <b>70</b>
2016-01-29 15:20:59 - database error:  AbanteCart core v.1.2.4 Error: <br />SELECT dataset_id
                                                                                  FROM abc_datasets
                                                                                  WHERE dataset_name = 'install_upgrade_history'
                                                                                                AND dataset_key='admin' LIMIT 1 in <b>/home/webdevmerc/tst/core/database/amysqli.php</b> on line <b>105</b>



I CAN run the above sql statement in the database in PhpMyAdmin and get:

SQL:
SELECT dataset_id
FROM abc_datasets
WHERE dataset_name = 'install_upgrade_history'
AND dataset_key = 'admin'
LIMIT 1

OUTPUT:
dataset_id
4


The structure of abc_datasets
#   Name      Type      Collation   Attributes   Null   Default   Extra   
1   dataset_id   int(11)                  No    None           AUTO_INCREMENT
2   dataset_name   varchar(255)   utf8_general_ci   No    None
3   dataset_key   varchar(255)   utf8_general_ci   Yes    

DATA of datasets
SELECT *
FROM `abc_datasets`
LIMIT 0 , 30

dataset_id    dataset_name          dataset_key
1       menu             storefront
2       menu             admin
3       menu             storefront_description
4       install_upgrade_history    admin
5       file_uploads          admin


I've considered changing all my database tables to use the ac_ prefix, but saw various unix files using the abc_ prefix so didn't go in that direction yet.


Offline abantecart

  • Administrator
  • Hero Member
  • *****
  • Posts: 4358
  • Karma: +298/-10
    • View Profile
    • Ideal Open Source Ecommerce Solution
I can suggest manual upgrade, that I have done many times.

1. Run upgrade.sql manually in PhpMyAdmin.
NOTE: Replace 'ac_' prefix with prefix that you have in your tables.

2. Include (if present in upgrade) upgrade.php file somewhere is admin controller.
Say in admin/controller/common/head.php in about line 30.
include('/path/upgrade.php'); 

Load admin page once!

This will execute PHP update script and will do it's magic. :)

Remove the include line.

3. Replace all the files that are provided in the upgrade package over your files.

Do this on a backup/test copy of the store to prevent errors.

4. Clear cache files
Please  rate your experience or leave your review
We need your help to build better free open source ecommerce platform for everyone. See how you can help

Offline webdevmerc

  • Full Member
  • ***
  • Posts: 172
  • Karma: +32/-1
    • View Profile
I can suggest manual upgrade, that I have done many times.

1. Run upgrade.sql manually in PhpMyAdmin.
NOTE: Replace 'ac_' prefix with prefix that you have in your tables.

2. Include (if present in upgrade) upgrade.php file somewhere is admin controller.
Say in admin/controller/common/head.php in about line 30.
include('/path/upgrade.php'); 

Load admin page once!

This will execute PHP update script and will do it's magic. :)

Remove the include line.

3. Replace all the files that are provided in the upgrade package over your files.

Do this on a backup/test copy of the store to prevent errors.

4. Clear cache files


Thanks for posting and sharing this method...I was planning to just copy the files over and "editing" the core/version.php file to make it match the latest version since that was the last piece not mentioned in the docs as to how to get your version numbers to match after the upgrade.

I'll try this with the include path and see how it goes.


Offline webdevmerc

  • Full Member
  • ***
  • Posts: 172
  • Karma: +32/-1
    • View Profile
I upgraded from 1.2.4 -> 1.2.5 manually and it looks ok, the include option above (not in the docs) seems to do the database delete/update stuff for people who are wondering.


All that said, similar to the other manual process in the docs of just copying files, should we just copy over the version.php over from the latest Abantecart zip file so it doesn't alert us that we still need to upgrade?  None of the docs show how to update that file (and one reason I was hesitant to do it manually in case I miss some stuff that's going on behind the scenes).


Lastly, if someone can answer, is it safe to assume that if I unzip the full install (abantecart_1.2.5.zip) and compare my live files to the files in this zip, as long as they are the same, I am good to go?


The auto package update thing hasn't worked well for me probably due to my changes and my hosting provider, but if this is pretty much key (matching the files up and just copying over version.php), then I will probably just do it this way moving forward...


Thanks for any clarification.

 

Powered by SMFPacks Social Login Mod