Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

My database is corrupted?


JipeTrade

Recommended Posts

Posted

I went to restore my database now it seems they are all corrupted somehow? I have 5 back ups and I have used them before so it makes no sence.

 

 

I keep getting this error

 

 

 

Error

 

SQL query: Documentation

CREATE TABLE theme_configuration(
configuration_id int( 11 ) NOT NULL AUTO_INCREMENT ,
configuration_title varchar( 64 ) NOT NULL ,
configuration_key varchar( 64 ) default 'BOX_HEADING_' NOT NULL ,
configuration_value varchar( 255 ) NOT NULL ,
configuration_description varchar( 255 ) NOT NULL ,
configuration_group_id int( 11 ) default '1' NOT NULL ,
configuration_column varchar( 64 ) default 'left' NOT NULL ,
location int( 5 ) default '0' NOT NULL ,
sort_order int( 5 ) ,
last_modified datetime,
date_added datetime default '0000-00-00 00:00:00' NOT NULL ,
box_heading varchar( 64 ) NOT NULL ,
set_function varchar( 255 ) default 'tep_cfg_select_option(array(' LEFT ', ' RIGHT '),',
PRIMARY KEY ( configuration_id )
);

MySQL said: Documentation
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'left', 'right'),' ,
 PRIMARY KEY (configuration_id)
)' at line 14

 

anyone know what it could cause this???

 

I just installed easy cvs

Running oscommerce-2.2ms2-060817

Posted

You should turn the "magic_quotes_gpc" setting on in your php local setting, via php.ini or .htaccess

Everyone is changing the world.

Everyone is a world.

For everyone needs my help, PM or email if I amn't online.

Posted
You should turn the "magic_quotes_gpc" setting on in your php local setting, via php.ini or .htaccess

 

I turned it on and now I am getting this message when I go to admin.

 

FATAL ERROR: register_globals is disabled in php.ini, please enable it!

Running oscommerce-2.2ms2-060817

Posted
I turned it on and now I am getting this message when I go to admin.

 

FATAL ERROR: register_globals is disabled in php.ini, please enable it!

 

I enabled register_globals.....is that okay?

 

I got my Database fixed.

 

So I tried again to see if I could restore my database files and I am still getting the same error messages. Does this have to do with me editing out the right side bar from my website?

Running oscommerce-2.2ms2-060817

Posted

not register_globals,

but magic_quotes_gpc

Everyone is changing the world.

Everyone is a world.

For everyone needs my help, PM or email if I amn't online.

Posted
not register_globals,

but magic_quotes_gpc

I'm sorry I wasn't clear.

 

I enabled magic_quotes_gpc. afterward, I received the message that " register globals needs to be enabeled for admin" So, I then enabled register_globals. But, my database is still not working correctly. I try to restore it. The theme_configuration gets hung up every time.

Running oscommerce-2.2ms2-060817

Posted

try to download the backup files(.sql) and run it in the phpmyadmin which is part of your hosting control panel

Everyone is changing the world.

Everyone is a world.

For everyone needs my help, PM or email if I amn't online.

Posted

I actually tried that with each of my back ups and had the same exact problem.

 

 

 

It seems like the database files that my store created( the backups I made with oscommerce admin) were corrupted at the same spot....in theme_configuration. If I create a backup with myphpadmin everything works fine( with a fixed database). So it seems for some reason the admin isn't correctly backing up the theme table.

 

Any idea what could cause this?

 

 

I had to piece together my database from the broken one and one that was okay in order to save all the products and information that I have in the database.

Running oscommerce-2.2ms2-060817

Posted

you need to escape the single quotes in your sql statement. sql is just like php in this regard: single quotes mean something, so if you want to include them in a string they need to be handled appropriately.

 

instead of

set_function varchar( 255 ) default 'tep_cfg_select_option(array(' LEFT ', ' RIGHT '),',

 

use

set_function varchar( 255 ) default 'tep_cfg_select_option(array(\' LEFT \', \' RIGHT \'),',

Posted
you need to escape the single quotes in your sql statement. sql is just like php in this regard: single quotes mean something, so if you want to include them in a string they need to be handled appropriately.

 

instead of

set_function varchar( 255 ) default 'tep_cfg_select_option(array(' LEFT ', ' RIGHT '),',

 

use

set_function varchar( 255 ) default 'tep_cfg_select_option(array(\' LEFT \', \' RIGHT \'),',

hmm,

 

So how come it works in phpadmin when I do a back up then restore....but not from the oscommerce admin?

 

 

I will give this a try when I feel brave enough to risk another database hassle

Running oscommerce-2.2ms2-060817

Posted

If you've read very many postings on here you quickly learn that the backups from the admin do not always work correctly. When I backup my database, I just export using phpmyadmin and I export the structure and the data.

Paul

 

hmm,

 

So how come it works in phpadmin when I do a back up then restore....but not from the oscommerce admin?

 

 

I will give this a try when I feel brave enough to risk another database hassle

Posted
If you've read very many postings on here you quickly learn that the backups from the admin do not always work correctly. When I backup my database, I just export using phpmyadmin and I export the structure and the data.

Paul

That explains everything then.

 

Thanks

Running oscommerce-2.2ms2-060817

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...