Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

FYI - ERROR found in default version of


yesudo

Recommended Posts

Posted

line 247 - in drop table query :

 

prodcts_description

 

should be:

 

products_description

Your online success is Paramount.

Posted

if you look at your database.php file, in the catalog\install\includes\functions on line 201 it is there too.

 

so the one in the catalog\admin\backup.php file line 247 may be tied in with how the installation procedure is working.

Posted
if you look at your database.php file, in the catalog\install\includes\functions on line 201 it is there too.

 

so the one in the catalog\admin\backup.php file line 247 may be tied in with how the installation procedure is working.

To save me the time of figuring out the implications of this for installs can you explain what problems this could create for newbies?

Local: Mac OS X 10.5.8 - Apache 2.2/php 5.3.0/MySQL 5.4.10 • Web Servers: Linux

Tools: BBEdit, Coda, Versions (Subversion), Sequel Pro (db management)

Posted

my understanding on how it will effect the backup process is that the error appears in the restore element.

 

it attempts to drop the table to then restore a backup - but as it attempts to drop a table that doesn't exist(spelling mistake) then the correct table will still be there creating a 'Table already exists error' upon restore.

Your online success is Paramount.

Posted
my understanding on how it will effect the backup process is that the error appears in the restore element.

 

it attempts to drop the table to then restore a backup - but as it attempts to drop a table that doesn't exist(spelling mistake) then the correct table will still be there creating a 'Table already exists error' upon restore.

I understand that and I've made notes and already corrected a few files, thanks.

 

Most of time I spend here is spent on watching just for things like this but also helping newbies. So everytime I see something that could stump a newbie, especially on installs, I make a note.

Local: Mac OS X 10.5.8 - Apache 2.2/php 5.3.0/MySQL 5.4.10 • Web Servers: Linux

Tools: BBEdit, Coda, Versions (Subversion), Sequel Pro (db management)

Posted

i think the file that Mibble mentions will create the same problem on an install if you are installing over an existing osc db.

Your online success is Paramount.

Posted

is it not a case of drop table if exist and as the table does not exist it will not drop it.

 

I have had no issues or errors on restoring a database.

 

You are correct in that it is a typo.

 

What happens to all the additional tables added by contributions.

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Posted

it says drop Table prodcts_description which doesn't exist and as such leaves products_description in place.

 

which in essence could create a duplicate table error - but upon looking at a backup the tables are also dropped, by sql, b4 restore and the correct table name is used. thus circumventing a problem.

 

so yes there is an error - but it appears to get corrected, I assume, by sql.

 

I also wondered about additional tables - added when adding a contrib - but i think as the backup/restore is actually dealt with at sql level these will all automatically get included - i think the php drop table query maybe a herring(of the red variety).

Your online success is Paramount.

Posted

yes that was my thoughts as there is no function to automatically add tables created by contributions to that part of code and as you say correctly this is dealt with at sql level without issue

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Posted

It seems to me that if your database is kaput, your store is probably down....so wouldn't it be better to do that backup and restore through phpMyAdmin or whatever you have?

Chris Dunning

osCommerce, Contributions Moderator Team

 

Please do not send me PM! I do not read or answer these often. Use the email button instead!

 

I do NOT support contributions other than my own. Emails asking for support on other people's contributions will be ignored. Ask in the forum or contact the contribution author directly.

Posted
It seems to me that if your database is kaput, your store is probably down....so wouldn't it be better to do that backup and restore through phpMyAdmin or whatever you have?

depends why you want to restore i would have thot - not always because db is kaput.

 

some people don't have phpmyadmin, don't know how to use it or don't know it exists.

Your online success is Paramount.

Posted

I suppose that's true....and I could see that you might want to do a database backup for reasons other than a complete meltdown. However, I find it more than a little comforting to know that I have regular backups stored on my hard drive here as well as on the server in case everything goes bad.

 

I took a peek at the code and it seems to me that the osC backup function is pulling a list of tables from the database then backing up using that list, not a pre-defined list of the tables that existed in the original distribution. This really seems like the easiest way for the code to be written and the best way. I don't think the code is the issue if all of your tables don't go.

 

I have in the past had issues with the backup function not working properly - tables were left out or what have you. I think it was more a timeout issue than a coding issue. I think at the very least you should examine every backup you make (regardless of whether you do it with osC or phpMyAdmin) and make sure that all the tables came through. If you see "zones" at the end that's a pretty good indication.

Chris Dunning

osCommerce, Contributions Moderator Team

 

Please do not send me PM! I do not read or answer these often. Use the email button instead!

 

I do NOT support contributions other than my own. Emails asking for support on other people's contributions will be ignored. Ask in the forum or contact the contribution author directly.

Posted
I think at the very least you should examine every backup you make (regardless of whether you do it with osC or phpMyAdmin) and make sure that all the tables came through.

i agree having also experienced probs b4.

Your online success is Paramount.

Posted

Just been reading this, i presume this code needs to be changed whether it causes a problem or not, is that correct?

 

Derek

Posted
Just been reading this, i presume this code needs to be changed whether it causes a problem or not, is that correct?

 

Derek

i have changed it on the stores I manage/build.

Your online success is Paramount.

Posted
Just been reading this, i presume this code needs to be changed whether it causes a problem or not, is that correct?

 

Derek

In the view of correct coding then you can change this, however as pointed out in this topic it is dealt with at sql level and therefore changing the code should bring no discernible difference.

 

choice is your own

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Archived

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

×
×
  • Create New...