Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Can't write to db after DB restore


daliose

Recommended Posts

Posted

We have running OSC 2.3 and I had to restore the DB.

Now, OSC is back online and all items are visible, but if I do changes to existing items and press the "Save" button,

the item will be saved as an empty row. No name, no pic, nothing will be saved and the item is gone.

 

We haven't done any changes to the db itself and the back was a raw .sql dump.

 

Any idea, what's going on,there?

Posted

Your backup was also of your osC 2.3 store? BTW, 2.3 is fairly old and should really be upgraded to the current 2.3.3. My first guess would be that when you restored the backup, you either forgot to tell MySQL that everything should be UTF-8 (the default is Latin-1), and/or you failed to tell phpMyAdmin that the backup file is UTF-8 encoded, not the default Latin-1. Once you've checked that, did the database appear to be reloaded (all the tables seemed to have the right data in them)?

Posted

@@daliose

 

On top of what Phil suggested.

 

Did you give the username read/ write permissions ?

 

 

 

Chris

  • 1 month later...
Posted

Hi,

for everyone who have same issue.

Maybe it is depend on my configuration, but the problem were solved with deleting/commenting the redirection code I added to the htaccess file.

I did a redirection from non-www to www.domainname.com and my page doesn't seems to work with the www in front of the domain.

The page is visible and usable, but however, all database write querys for products updates fail.

 

After I deleted the redirection my page was pack working normal.

Posted

So a 301 redirect from mystore.com to www.mystore.com broke the database usage on your site? Very interesting. It would be nice to restore the redirect, because otherwise you risk having search engines catalog both mystore.com and www.mystore.com, leading to reduced rankings and possibly duplicate content penalties (anyone know why Google et al. are not smart enough to treat the two as the same domain?).

 

Is your database host "localhost" or "127.0.0.1", or is it a named machine (e.g., "mystore.com") or IP address? I can't imagine how an outgoing request would get redirected, unless possibly it was on the same machine as your site? Anyway, when doing the redirect, did you check only that it didn't start with www., or did you check the entire domain name? It might be worth a try checking the entire domain name (RewriteCond condition).

Archived

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

×
×
  • Create New...