Post by bikin4fun » Wed Oct 01, 2014 10:54 pm

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

User avatar
Newbie

Posts

Joined
Sun Jun 05, 2011 1:26 am
Location - USA

Post by beipink » Thu Oct 02, 2014 12:25 am

-edit-
upgrade from 1.5.5 to 2.0 doesn't appear to be supported. Maybe some migration script will be created later on.
Last edited by beipink on Sun Oct 05, 2014 8:10 pm, edited 1 time in total.

Active Member

Posts

Joined
Tue Mar 20, 2012 7:43 pm

Post by hermis » Thu Oct 02, 2014 12:40 am

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 26825 times


Newbie

Posts

Joined
Thu Oct 02, 2014 12:25 am

Post by hamidg84 » Thu Oct 02, 2014 6:30 am

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

Active Member

Posts

Joined
Wed Feb 29, 2012 6:18 am

Post by beipink » Thu Oct 02, 2014 2:01 pm

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

Active Member

Posts

Joined
Tue Mar 20, 2012 7:43 pm

Post by hermis » Thu Oct 02, 2014 3:16 pm

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..

Newbie

Posts

Joined
Thu Oct 02, 2014 12:25 am

Post by beipink » Thu Oct 02, 2014 3:42 pm

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+

Active Member

Posts

Joined
Tue Mar 20, 2012 7:43 pm

Post by hermis » Thu Oct 02, 2014 4:50 pm

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

Newbie

Posts

Joined
Thu Oct 02, 2014 12:25 am

Post by richylh » Thu Oct 02, 2014 7:03 pm

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();
Last edited by richylh on Fri Oct 03, 2014 10:19 am, edited 1 time in total.

Newbie

Posts

Joined
Mon Feb 14, 2011 7:39 am

Post by leonattpcs » Fri Oct 03, 2014 5:27 am

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

Newbie

Posts

Joined
Tue Mar 26, 2013 5:15 pm

Post by luisvillacrez » Fri Oct 03, 2014 6:09 am

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?

Attachments

error.jpg

error.jpg (234.25 KiB) Viewed 26687 times


Newbie

Posts

Joined
Sun Sep 21, 2014 8:55 am

Post by padred123 » Fri Oct 03, 2014 1:13 pm

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.

New member

Posts

Joined
Wed Mar 24, 2010 6:05 am

Post by shiv0307 » Tue Oct 07, 2014 5:02 am

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

Newbie

Posts

Joined
Tue Oct 07, 2014 2:10 am

Post by munciemc » Sat Oct 18, 2014 3:16 am

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...

Newbie

Posts

Joined
Mon Aug 18, 2014 9:25 pm

Post by mattalt » Mon Oct 20, 2014 9:54 am

Can´t even access to my admin after installing 2.0. It says: "User and/or password not recognized"

New member

Posts

Joined
Thu May 31, 2012 7:12 am

Post by ansarka83 » Sun Dec 14, 2014 3:21 am

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

Newbie

Posts

Joined
Sun Dec 14, 2014 3:18 am

Post by cosmetophoria » Fri Dec 19, 2014 1:58 am

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

Newbie

Posts

Joined
Fri Dec 19, 2014 1:55 am

Post by evanomondi » Sat Jan 24, 2015 10:07 pm

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.

Newbie

Posts

Joined
Thu Jan 15, 2015 7:41 pm

Post by stavroch » Mon Apr 20, 2015 3:52 pm

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.

Newbie

Posts

Joined
Thu Apr 04, 2013 1:45 am

Post by jonjazz » Wed May 13, 2015 7:15 am

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

Newbie

Posts

Joined
Tue Feb 05, 2013 3:40 pm
Who is online

Users browsing this forum: No registered users and 15 guests