Post by N1kko » Thu Oct 08, 2015 9:03 pm

Hi,

Just updated to 2.1.0.1 but get these database errors can anyone help?

Code: Select all

Notice: Error: Table 'jaters_site.oc_cart' doesn't exist
Error No: 1146
DELETE FROM oc_cart WHERE customer_id = '0' AND date_added < DATE_SUB(NOW(), INTERVAL 1 HOUR) in /home/jaters/public_html/site/system/library/db/mysqli.php on line 41Notice: Error: Table 'jaters_site.oc_cart' doesn't exist
Error No: 1146
SELECT * FROM oc_cart WHERE customer_id = '0' AND session_id = 'fad5a0b3bd13f7be0eef017e796980bb' in /home/jaters/public_html/site/system/library/db/mysqli.php on line 41Notice: Trying to get property of non-object in /home/jaters/public_html/site/system/library/cart.php on line 37Warning: Invalid argument supplied for foreach() in /home/jaters/public_html/site/system/library/cart.php on line 37Notice: Error: Table 'jaters_site.oc_cart' doesn't exist
Error No: 1146
SELECT * FROM oc_cart WHERE customer_id = '0' AND session_id = 'fad5a0b3bd13f7be0eef017e796980bb' in /home/jaters/public_html/site/system/library/db/mysqli.php on line 41Notice: Trying to get property of non-object in /home/jaters/public_html/site/system/library/cart.php on line 37Warning: Invalid argument supplied for foreach() in /home/jaters/public_html/site/system/library/cart.php on line 37Notice: Error: Table 'jaters_site.oc_cart' doesn't exist
Error No: 1146
SELECT * FROM oc_cart WHERE customer_id = '0' AND session_id = 'fad5a0b3bd13f7be0eef017e796980bb' in /home/jaters/public_html/site/system/library/db/mysqli.php on line 41Notice: Trying to get property of non-object in /home/jaters/public_html/site/system/library/cart.php on line 37Warning: Invalid argument supplied for foreach() in /home/jaters/public_html/site/system/library/cart.php on line 37Notice: Error: Table 'jaters_site.oc_cart' doesn't exist
Error No: 1146
SELECT * FROM oc_cart WHERE customer_id = '0' AND session_id = 'fad5a0b3bd13f7be0eef017e796980bb' in /home/jaters/public_html/site/system/library/db/mysqli.php on line 41Notice: Trying to get property of non-object in /home/jaters/public_html/site/system/library/cart.php on line 37Warning: Invalid argument supplied for foreach() in /home/jaters/public_html/site/system/library/cart.php on line 37Notice: Error: Table 'jaters_site.oc_cart' doesn't exist
Error No: 1146
SELECT * FROM oc_cart WHERE customer_id = '0' AND session_id = 'fad5a0b3bd13f7be0eef017e796980bb' in /home/jaters/public_html/site/system/library/db/mysqli.php on line 41Notice: Trying to get property of non-object in /home/jaters/public_html/site/system/library/cart.php on line 37Warning: Invalid argument supplied for foreach() in /home/jaters/public_html/site/system/library/cart.php on line 37

User avatar
New member

Posts

Joined
Tue Dec 15, 2009 1:19 am

Post by Qphoria » Thu Oct 08, 2015 10:28 pm

Does your db use "oc_" as the prefix?

OpenCart 2.0.x Mod Update Info

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Todd Young » Thu Oct 08, 2015 10:47 pm

Same here... Trying to update from 2.0 to 2.1.0.1 and when I go to /install I get "Use of undefined constant DB_PORT" and cascading errors... Catastrophic error, crashes system.

Do not attempt upgrade to 2.1.0.1 yet!!!

Please see resulting errors below:

Code: Select all

Notice: Use of undefined constant DB_PORT - assumed 'DB_PORT' in /***etc***/install/model/upgrade.php on line 139

Warning: mysqli::mysqli() expects parameter 5 to be long, string given in /***etc***/system/library/db/mysqli.php on line 7

Warning: mysqli::set_charset(): Couldn't fetch mysqli in /***etc***/system/library/db/mysqli.php on line 14

Warning: mysqli::query(): Couldn't fetch mysqli in /***etc***/system/library/db/mysqli.php on line 15

Warning: mysqli::query(): Couldn't fetch mysqli in /***etc***/system/library/db/mysqli.php on line 19

Warning: DB\MySQLi::query(): Couldn't fetch mysqli in /***etc***/system/library/db/mysqli.php on line 21

Notice: Trying to get property of non-object in /***etc***/install/model/upgrade.php on line 146

Warning: Invalid argument supplied for foreach() in /***etc***/install/model/upgrade.php on line 146

Warning: mysqli::query(): Couldn't fetch mysqli in /***etc***/system/library/db/mysqli.php on line 19

Warning: DB\MySQLi::query(): Couldn't fetch mysqli in /***etc***/system/library/db/mysqli.php on line 21

Notice: Trying to get property of non-object in /***etc***/install/model/upgrade.php on line 314

Warning: Invalid argument supplied for foreach() in /***etc***/install/model/upgrade.php on line 314

Warning: mysqli::query(): Couldn't fetch mysqli in /***etc***/system/library/db/mysqli.php on line 19

Warning: DB\MySQLi::query(): Couldn't fetch mysqli in /***etc***/system/library/db/mysqli.php on line 21

Warning: mysqli::query(): Couldn't fetch mysqli in /***etc***/system/library/db/mysqli.php on line 19

Warning: DB\MySQLi::query(): Couldn't fetch mysqli in /***etc***/system/library/db/mysqli.php on line 21

Notice: Undefined index: oc_customer_group in /***etc***/install/model/upgrade.php on line 332

Warning: in_array() expects parameter 2 to be array, null given in /***etc***/install/model/upgrade.php on line 332

Notice: Undefined index: oc_product_option in /***etc***/install/model/upgrade.php on line 348

Warning: in_array() expects parameter 2 to be array, null given in /***etc***/install/model/upgrade.php on line 348

Warning: mysqli::query(): Couldn't fetch mysqli in /***etc***/system/library/db/mysqli.php on line 19

Warning: DB\MySQLi::query(): Couldn't fetch mysqli in /***etc***/system/library/db/mysqli.php on line 21

Notice: Trying to get property of non-object in /***etc***/install/model/upgrade.php on line 357

Warning: Invalid argument supplied for foreach() in /***etc***/install/model/upgrade.php on line 357

Warning: mysqli::query(): Couldn't fetch mysqli in /***etc***/system/library/db/mysqli.php on line 19

Warning: DB\MySQLi::query(): Couldn't fetch mysqli in /***etc***/system/library/db/mysqli.php on line 21

Notice: Trying to get property of non-object in /***etc***/install/model/upgrade.php on line 368

Warning: Invalid argument supplied for foreach() in /***etc***/install/model/upgrade.php on line 368

Warning: mysqli::query(): Couldn't fetch mysqli in /***etc***/system/library/db/mysqli.php on line 19

Warning: DB\MySQLi::query(): Couldn't fetch mysqli in /***etc***/system/library/db/mysqli.php on line 21

Notice: Trying to get property of non-object in /***etc***/install/model/upgrade.php on line 391

Warning: Invalid argument supplied for foreach() in /***etc***/install/model/upgrade.php on line 391

Warning: mysqli::query(): Couldn't fetch mysqli in /***etc***/system/library/db/mysqli.php on line 19

Warning: DB\MySQLi::query(): Couldn't fetch mysqli in /***etc***/system/library/db/mysqli.php on line 21

Notice: Trying to get property of non-object in /***etc***/install/model/upgrade.php on line 402

Warning: Invalid argument supplied for foreach() in /***etc***/install/model/upgrade.php on line 402

Warning: mysqli::query(): Couldn't fetch mysqli in /***etc***/system/library/db/mysqli.php on line 19

Warning: DB\MySQLi::query(): Couldn't fetch mysqli in /***etc***/system/library/db/mysqli.php on line 21

Notice: Trying to get property of non-object in /***etc***/install/model/upgrade.php on line 425

Warning: Invalid argument supplied for foreach() in /***etc***/install/model/upgrade.php on line 425

Warning: mysqli::query(): Couldn't fetch mysqli in /***etc***/system/library/db/mysqli.php on line 19

Warning: DB\MySQLi::query(): Couldn't fetch mysqli in /***etc***/system/library/db/mysqli.php on line 21

Notice: Trying to get property of non-object in /***etc***/install/model/upgrade.php on line 441

Warning: Invalid argument supplied for foreach() in /***etc***/install/model/upgrade.php on line 441

Warning: Cannot modify header information - headers already sent by (output started at /***etc***/install/model/upgrade.php:139) in/***etc***/system/library/response.php on line 12

Warning: mysqli::close(): Couldn't fetch mysqli in /***etc***/system/library/db/mysqli.php on line 58

Newbie

Posts

Joined
Wed Feb 20, 2013 12:55 pm

Post by N1kko » Thu Oct 08, 2015 10:58 pm

Qphoria wrote:Does your db use "oc_" as the prefix?
Yes oc_

User avatar
New member

Posts

Joined
Tue Dec 15, 2009 1:19 am

Post by Todd Young » Thu Oct 08, 2015 11:14 pm

My 2.0 config file did not have DB_PORT defined for some reason. I added it in both config files and set it to 3306 and cleared that hurdle.

I am now also getting the table oc_cart does not exist error. And indeed, it does not exist.

Newbie

Posts

Joined
Wed Feb 20, 2013 12:55 pm

Post by Vetroff » Fri Oct 09, 2015 12:46 am

As I can see, all we need to do - just create a SQL query from installation opencart.sql in store database with phpmyadmin etc.

Code: Select all

CREATE TABLE `oc_cart` (
  `cart_id` int(11) NOT NULL AUTO_INCREMENT,
  `customer_id` int(11) NOT NULL,
  `session_id` varchar(32) NOT NULL,
  `product_id` int(11) NOT NULL,
  `recurring_id` int(11) NOT NULL,
  `option` text NOT NULL,
  `quantity` int(5) NOT NULL,
  `date_added` datetime NOT NULL,
  PRIMARY KEY (`cart_id`),
  KEY `cart_id` (`customer_id`,`session_id`,`product_id`,`recurring_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

Newbie

Posts

Joined
Tue Apr 27, 2010 4:19 am

Post by Todd Young » Fri Oct 09, 2015 12:57 am

Thanks, I had done that but then more problems (missing tables as well as PHP errors) just kept popping up. So I stopped and looked deeper into the community's forum posts and saw that this is a bigger deal than I expected, so I stopped the pursuit.

Being a Drupal guy first I think I was a little bit spoiled and didn't read enough about catastrophic errors in upgrading early versions of 2.x - I think I'll just restore my 2.0 and wait for things to simmer down.

Newbie

Posts

Joined
Wed Feb 20, 2013 12:55 pm

Post by N1kko » Fri Oct 09, 2015 3:06 am

Vetroff wrote:As I can see, all we need to do - just create a SQL query from installation opencart.sql in store database with phpmyadmin etc.

Code: Select all

CREATE TABLE `oc_cart` (
  `cart_id` int(11) NOT NULL AUTO_INCREMENT,
  `customer_id` int(11) NOT NULL,
  `session_id` varchar(32) NOT NULL,
  `product_id` int(11) NOT NULL,
  `recurring_id` int(11) NOT NULL,
  `option` text NOT NULL,
  `quantity` int(5) NOT NULL,
  `date_added` datetime NOT NULL,
  PRIMARY KEY (`cart_id`),
  KEY `cart_id` (`customer_id`,`session_id`,`product_id`,`recurring_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

Seems to have fixed things for me.
Thanks

User avatar
New member

Posts

Joined
Tue Dec 15, 2009 1:19 am

Post by N1kko » Sat Oct 17, 2015 11:03 pm

Had to restore back to previous opencart version as I had too many issues.

User avatar
New member

Posts

Joined
Tue Dec 15, 2009 1:19 am

Post by billynoah » Sun Oct 18, 2015 12:02 am

The upgrade script doesn't appear to do anything. When I ran the upgrade on an install from 2.0.0.0. to 2.1.0.1 it finished in about 0.1 seconds and there were no changes to my database. I ended up creating all the tables by hand and had to recreate the various layouts for extensions.

What gives here? Is the upgrade script broken or non-existent?

Image


User avatar
Active Member

Posts

Joined
Tue Jan 15, 2013 12:46 pm

Post by AnatoliaCollection » Sun Aug 27, 2017 5:20 am

Hi
This is Eyup and i am newbie about php and bit of opencart.
I am using 2.1.0.2 Version of opencart.
When i search something in frontend gives me :
2017-08-26 21:09:22 - PHP Warning: Error while sending QUERY packet. PID=801431 in /home/anatolia9016/public_html/system/library/db/mysqli.php on line 19
2017-08-26 21:09:22 - PHP Notice: Error: MySQL server has gone away<br />Error No: 2006<br />SELECT * FROM `ant_language` in /home/anatolia9016/public_html/system/library/db/mysqli.php on line 41
2017-08-26 21:09:22 - PHP Notice: Trying to get property of non-object in /home/anatolia9016/public_html/admin/index.php on line 123
2017-08-26 21:09:22 - PHP Warning: Invalid argument supplied for foreach() in /home/anatolia9016/public_html/admin/index.php on line 123
2017-08-26 21:09:22 - PHP Notice: Undefined index: en in /home/anatolia9016/public_html/admin/index.php on line 127
2017-08-26 21:09:22 - PHP Notice: Undefined index: en in /home/anatolia9016/public_html/admin/index.php on line 130
2017-08-26 21:09:22 - PHP Notice: Undefined index: en in /home/anatolia9016/public_html/admin/index.php on line 131
2017-08-26 21:09:22 - PHP Notice: Error: MySQL server has gone away<br />Error No: 2006<br />SELECT * FROM ant_currency in /home/anatolia9016/public_html/system/library/db/mysqli.php on line 41
2017-08-26 21:09:22 - PHP Notice: Trying to get property of non-object in /home/anatolia9016/public_html/system/library/currency.php on line 15
2017-08-26 21:09:22 - PHP Warning: Invalid argument supplied for foreach() in /home/anatolia9016/public_html/system/library/currency.php on line 15
2017-08-26 21:09:22 - PHP Notice: Error: MySQL server has gone away<br />Error No: 2006<br />SELECT * FROM ant_weight_class wc LEFT JOIN ant_weight_class_description wcd ON (wc.weight_class_id = wcd.weight_class_id) WHERE wcd.language_id = '0' in /home/anatolia9016/public_html/system/library/db/mysqli.php on line 41
2017-08-26 21:09:22 - PHP Notice: Trying to get property of non-object in /home/anatolia9016/public_html/system/library/weight.php on line 11
2017-08-26 21:09:22 - PHP Warning: Invalid argument supplied for foreach() in /home/anatolia9016/public_html/system/library/weight.php on line 11
2017-08-26 21:09:22 - PHP Notice: Error: MySQL server has gone away<br />Error No: 2006<br />SELECT * FROM ant_length_class mc LEFT JOIN ant_length_class_description mcd ON (mc.length_class_id = mcd.length_class_id) WHERE mcd.language_id = '0' in /home/anatolia9016/public_html/system/library/db/mysqli.php on line 41
2017-08-26 21:09:22 - PHP Notice: Trying to get property of non-object in /home/anatolia9016/public_html/system/library/length.php on line 11
2017-08-26 21:09:22 - PHP Warning: Invalid argument supplied for foreach() in /home/anatolia9016/public_html/system/library/length.php on line 11
2017-08-26 21:09:22 - PHP Notice: Error: MySQL server has gone away<br />Error No: 2006<br />SELECT * FROM ant_user WHERE user_id = '1' AND status = '1' in /home/anatolia9016/public_html/system/library/db/mysqli.php on line 41
2017-08-26 21:09:22 - PHP Notice: Trying to get property of non-object in /home/anatolia9016/public_html/system/library/user.php on line 15
2017-08-26 21:09:22 - PHP Notice: Error: MySQL server has gone away<br />Error No: 2006<br />SELECT * FROM ant_extension WHERE `type` = 'openbay' in /home/anatolia9016/public_html/system/library/db/mysqli.php on line 41
2017-08-26 21:09:22 - PHP Notice: Trying to get property of non-object in /home/anatolia9016/public_html/system/library/openbay.php on line 119
2017-08-26 21:09:22 - PHP Warning: Invalid argument supplied for foreach() in /home/anatolia9016/public_html/system/library/openbay.php on line 119
2017-08-26 21:09:22 - PHP Notice: Error: MySQL server has gone away<br />Error No: 2006<br />SELECT * FROM ant_event in /home/anatolia9016/public_html/system/library/db/mysqli.php on line 41
2017-08-26 21:09:22 - PHP Notice: Trying to get property of non-object in /home/anatolia9016/public_html/admin/index.php on line 158
2017-08-26 21:09:22 - PHP Warning: Invalid argument supplied for foreach() in /home/anatolia9016/public_html/admin/index.php on line 158
Can anyone help me with this?
Thank you in advance


Posts

Joined
Thu Jun 29, 2017 12:28 am
Who is online

Users browsing this forum: No registered users and 17 guests