Page 1 of 2

Opencart 2.0 Upgrade bug

Posted: Wed Oct 01, 2014 10:54 pm
by bikin4fun
I am getting this error during my upgdare of http://rentusmailbox.com/install/index. ... te=upgrade

Fatal error: Class 'DB\stdClass' not found in /home2/neighbor/public_html/rentusmailbox.com/system/library/db/mysql.php on line 39

Mysql.php attached

Re: Opencart 2.0 Upgrade bug

Posted: Thu Oct 02, 2014 12:25 am
by beipink
-edit-
upgrade from 1.5.5 to 2.0 doesn't appear to be supported. Maybe some migration script will be created later on.

Re: Opencart 2.0 Upgrade bug

Posted: Thu Oct 02, 2014 12:40 am
by hermis
I'm getting this error "Fatal error: Class 'DB\stdClass' not found in" when upgrading opencart from 1.5.3.1 to 2.0.0.0
screenshot.jpg

screenshot.jpg (96.37 KiB) Viewed 26844 times


Re: Opencart 2.0 Upgrade bug

Posted: Thu Oct 02, 2014 6:30 am
by hamidg84
When trying to upgrade via /install, im getting the follow error

PHP Notice: Use of undefined constant DIR_MODIFICATION - assumed 'DIR_MODIFICATION' in /home/xxx/public_html/system/startup.php on line 53
PHP Notice: Use of undefined constant DIR_MODIFICATION - assumed 'DIR_MODIFICATION' in /home/xxx/public_html/system/startup.php on line 57
PHP Fatal error: Class 'DB\stdClass' not found in /home/xxx/public_html/system/library/db/mysql.php on line 39

Re: Opencart 2.0 Upgrade bug

Posted: Thu Oct 02, 2014 2:01 pm
by beipink
hermis wrote:I'm getting this error "Fatal error: Class 'DB\stdClass' not found in" when upgrading opencart from 1.5.3.1 to 2.0.0.0
screenshot.jpg
It's likely something wrong in the config.php file. Make a fresh install of OC2.0 and then change the DB details in the config.php and run the upgrade script yoursite/install.
It should work

Re: Opencart 2.0 Upgrade bug

Posted: Thu Oct 02, 2014 3:16 pm
by hermis
beipink wrote:
hermis wrote:I'm getting this error "Fatal error: Class 'DB\stdClass' not found in" when upgrading opencart from 1.5.3.1 to 2.0.0.0
screenshot.jpg
It's likely something wrong in the config.php file. Make a fresh install of OC2.0 and then change the DB details in the config.php and run the upgrade script yoursite/install.
It should work
config file is ok, db login data and filepaths are correct. problem is somewhere else..

Re: Opencart 2.0 Upgrade bug

Posted: Thu Oct 02, 2014 3:42 pm
by beipink
No errors here although DB is not modified (tables are not added). PHP 5.4.
It must be something corrupt somewhere in your installation.
Try and replace all files. Update to OC 1.5.6 first and then on to OC 2.0 and see if that gives you any error. Keep tab of the tables created.
If I remember correctly OC1.5.5 has 109Tables OC1.5.6 130+ and OC2.0 150+

Re: Opencart 2.0 Upgrade bug

Posted: Thu Oct 02, 2014 4:50 pm
by hermis
beipink wrote:No errors here although DB is not modified (tables are not added). PHP 5.4.
It must be something corrupt somewhere in your installation.
Try and replace all files. Update to OC 1.5.6 first and then on to OC 2.0 and see if that gives you any error. Keep tab of the tables created.
If I remember correctly OC1.5.5 has 109Tables OC1.5.6 130+ and OC2.0 150+
upgrade from 1.5.3.1 to 1.5.6.4 went OK, from 1.5.6.4 to 2.0.0.0 gave same error as posted above in screenshot:
Fatal error: Class 'DB\stdClass' not found in C:\wamp\www\bem\system\library\db\mysql.php on line 39

Re: Opencart 2.0 Upgrade bug

Posted: Thu Oct 02, 2014 7:03 pm
by richylh
hamidg84 wrote:When trying to upgrade via /install, im getting the follow error

PHP Notice: Use of undefined constant DIR_MODIFICATION - assumed 'DIR_MODIFICATION' in /home/xxx/public_html/system/startup.php on line 53
PHP Notice: Use of undefined constant DIR_MODIFICATION - assumed 'DIR_MODIFICATION' in /home/xxx/public_html/system/startup.php on line 57
PHP Fatal error: Class 'DB\stdClass' not found in /home/xxx/public_html/system/library/db/mysql.php on line 39
For the missing DIR_Modification, please update the config.php and admin/config.php by adding a new line:

Code: Select all

define('DIR_MODIFICATION', 'xxxxxx/system/modification/'); 
(xxxxx is your root shop directory)


For the system/library/db/mysql.php, please find:

Code: Select all

$query = new stdClass();
and update with:

Code: Select all

$query = new \stdClass();

Re: Opencart 2.0 Upgrade bug

Posted: Fri Oct 03, 2014 5:27 am
by leonattpcs
Hi,
Thanks for the post, I have tried this fix and when running the install again, I get:
Parse error: syntax error, unexpected '[' in /homepages/44/d478900058/htdocs/trade/system/library/db/mysql.php on line 39
Removing the [, give a different message:
Parse error: syntax error, unexpected '=' in /homepages/44/d478900058/htdocs/trade/system/library/db/mysql.php on line 39
Any war of fixing the issue, or using different code?
Thanks

Re: Opencart 2.0 Upgrade bug

Posted: Fri Oct 03, 2014 6:09 am
by luisvillacrez
Hello,

I just installed opencart 2.0 in my store and i keep getting error.

Whenever, i try to make any changes it doesn't save it. I'm guessing it has to do with the token error i receive.

Any knows how to solve this problem?

Re: Opencart 2.0 Upgrade bug

Posted: Fri Oct 03, 2014 1:13 pm
by padred123
For the missing DIR_Modification, please update the config.php and admin/config.php by adding a new line:

Code: Select all

define('DIR_MODIFICATION', 'xxxxxx/system/modification/'); 
(xxxxx is your root shop directory)


For the system/library/db/mysql.php, please find:

Code: Select all

$query = new stdClass();
and update with:

Code: Select all

$query = new \stdClass();

I tried upgrading from 1.5.4 and got both of the same errors. I applied the fix above and it cleared up the errors but then it couldn't find some tables. I also noticed a syntax error during the upgrade process(below). I just switched back to my backups and will wait until this is smoothed out.

opencart syntax error, unexpected $end in install/model/upgrade.php on line 271

Also.. People(aka luisvillacrez) please don't hijack threads with other errors/issues. Start your own thread.. Its just as easy.

Re: Opencart 2.0 Upgrade bug

Posted: Tue Oct 07, 2014 5:02 am
by shiv0307
I'm getting following error on upgrade. can you please help?

Notice: Use of undefined constant DIR_MODIFICATION - assumed 'DIR_MODIFICATION' in /home/goshoppeuk/public_html/system/startup.php on line 53

Notice: Use of undefined constant DIR_MODIFICATION - assumed 'DIR_MODIFICATION' in /home/goshoppeuk/public_html/system/startup.php on line 57

Fatal error: Class 'DB\stdClass' not found in /home/goshoppeuk/public_html/system/library/db/mysql.php on line 39

Re: Opencart 2.0 Upgrade bug

Posted: Sat Oct 18, 2014 3:16 am
by munciemc
I'm seeing the same issue. I'll be monitoring this for a fix. Since the current stable version is only supported for the next 6 months, i hope they have a fix for this soon...

Re: Opencart 2.0 Upgrade bug

Posted: Mon Oct 20, 2014 9:54 am
by mattalt
Can“t even access to my admin after installing 2.0. It says: "User and/or password not recognized"

Re: Opencart 2.0 Upgrade bug

Posted: Sun Dec 14, 2014 3:21 am
by ansarka83
I am trying to upgrade from 1.5.4 to 2.0
got below error

Notice: Error: Can't DROP 'option_value'; check that column/key exists
Error No: 1091
Error in: /home/******/public_html/******/install/model/upgrade.php line 349
ALTER TABLE `oc_product_option` DROP `option_value` in /home/*******/public_html/*****/system/library/db/mysql.php on line 53

Re: Opencart 2.0 Upgrade bug

Posted: Fri Dec 19, 2014 1:58 am
by cosmetophoria
Hello,

I've upgraded from 1.5.6.3 to 2.0.1.1 and can't even log in the Admin Panel.

I get the following:

Notice: Use of undefined constant DIR_MODIFICATION - assumed 'DIR_MODIFICATION' in /www/cosmetophoria.com/www/root/system/startup.php on line 53

Notice: Use of undefined constant DIR_MODIFICATION - assumed 'DIR_MODIFICATION' in /www/cosmetophoria.com/www/root/system/startup.php on line 57

Re: Opencart 2.0 Upgrade bug

Posted: Sat Jan 24, 2015 10:07 pm
by evanomondi
Hi

I fixed this problem. My issue was that I had forgoten to upload the theme update. I uploaded my theme update and this fixed the issue. Make sure your theme has an update for a new opencart version before upgrading.

Re: Opencart 2.0 Upgrade bug

Posted: Mon Apr 20, 2015 3:52 pm
by stavroch
Any news about this post?

I follow the instructions that are displayed to the https://www.youtube.com/watch?v=zRyIA9cWrSE but I get many errors
ex. Notice: Use of undefined constant DIR_MODIFICATION - assumed 'DIR_MODIFICATION' in /home/opencart/system/startup.php on line 53Notice

The Open Card is new installation I didn't had any products or configurations from 1.5.4.

Re: Opencart 2.0 Upgrade bug

Posted: Wed May 13, 2015 7:15 am
by jonjazz
I had the same errors and applied the code in the config files as suggested above and now everything seems to work as it should.

2015-05-12 17:58:19 - PHP Notice: Use of undefined constant DIR_MODIFICATION - assumed 'DIR_MODIFICATION' in /home1/jonjazz/public_html/system/startup.php on line 51
2015-05-12 17:58:19 - PHP Notice: Use of undefined constant DIR_MODIFICATION - assumed 'DIR_MODIFICATION' in /home1/jonjazz/public_html/system/startup.php on line 57

Thanks.

JB