0

Magento 1.9.1 OR 1.3

I had a running website on my old server but it never got any orders so I didn't worry about it much back then. After migrating to a new server I didn't even check it but now I want to use it again but it gives the Error message (below).

There is a chance this is Magento version 1.3 - How can I check that? And if so - it would likely not run with the mySQL and pHp versions on the new server, correct? Can anything be done to make it run somehow? I am interested in the exact same version of what I had before.

Here is the Error:

SQLSTATE[HY000]: General error: 145 Table './mysite_shop/log_visitor' is marked as crashed and should be repaired
Trace:
#0 /home/mysite/public_html/lib/Zend/Db/Statement.php(283): Zend_Db_Statement_Pdo->_execute(Array)
#1 /home/mysite/public_html/lib/Zend/Db/Adapter/Abstract.php(457): Zend_Db_Statement->execute(Array)
#2 /home/mysite/public_html/lib/Zend/Db/Adapter/Pdo/Abstract.php(230): Zend_Db_Adapter_Abstract->query('INSERT INTO `lo...', Array)
#3 /home/mysite/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(259): Zend_Db_Adapter_Pdo_Abstract->query('INSERT INTO `lo...', Array)
#4 /home/mysite/public_html/lib/Zend/Db/Adapter/Abstract.php(535): Varien_Db_Adapter_Pdo_Mysql->query('INSERT INTO `lo...', Array)
#5 /home/mysite/public_html/app/code/core/Mage/Core/Model/Mysql4/Abstract.php(349): Zend_Db_Adapter_Abstract->insert('log_visitor', Array)
#6 /home/mysite/public_html/app/code/core/Mage/Core/Model/Abstract.php(251): Mage_Core_Model_Mysql4_Abstract->save(Object(Mage_Log_Model_Visitor))
#7 /home/mysite/public_html/app/code/core/Mage/Log/Model/Visitor.php(157): Mage_Core_Model_Abstract->save()
#8 /home/mysite/public_html/app/code/core/Mage/Core/Model/App.php(1167): Mage_Log_Model_Visitor->initByRequest(Object(Varien_Event_Observer))
#9 /home/mysite/public_html/app/Mage.php(301): Mage_Core_Model_App->dispatchEvent('controller_acti...', Array)
#10 /home/mysite/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(410): Mage::dispatchEvent('controller_acti...', Array)
#11 /home/mysite/public_html/app/code/core/Mage/Core/Controller/Front/Action.php(45): Mage_Core_Controller_Varien_Action->preDispatch()
#12 /home/mysite/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(356): Mage_Core_Controller_Front_Action->preDispatch()
#13 /home/mysite/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(247): Mage_Core_Controller_Varien_Action->dispatch('index')
#14 /home/mysite/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(158): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#15 /home/mysite/public_html/app/Mage.php(457): Mage_Core_Controller_Varien_Front->dispatch()
#16 /home/mysite/public_html/index.php(69): Mage::run('mysiteisbestpro...', 'website')
#17 {main}                         
Allysin
  • 250
  • 1
  • 23
  • 72

2 Answers2

0

To check the tables:

CHECK TABLE log_visitor

To repair the table:

REPAIR TABLE log_visitor

Determine Magento version without access to code base

Pavel Novitsky
  • 533
  • 2
  • 9
  • Pavel Novitsky: I can't access front-end or Admin to determine Magento version. http://www.mysite/downloader/ comes up with just the Magento Connect Manager logo and there is no styles.css in /skin/frontend/default/default/css/ I think I have to start by determining the Magento version because it's is for sure that if it is Magento 1.3.1 then the problem is with the mySQL and pHp versions and I have to figure out something different (like retrieving the product images and descriptions and putting that into a brand new install of Magento). I think repairing the table would not help if Mage1.3.1 – Allysin Oct 02 '17 at 17:23
  • According version — you can check app/Mage.php method getVesion() to figure out real magento version – Pavel Novitsky Oct 02 '17 at 17:49
  • Queries can be executed in sql, this error is not connected to magento itself – Pavel Novitsky Oct 02 '17 at 17:50
  • Pavel Novitsky: Thank you for all your help. The version IS 1.3.1...and that's bad news....I know because I've been through this before - I used to have to pay 2 expensive servers just so that on the old server we would have the old version of pHp and mySQL and on the new server we had the newer versions of these to run Magento 1.9.1. So now I have to figure out how to pull the photos and possibly product information from the 1.3.1 version, setup the latest pre-version 2 Magento and manually enter that in.... – Allysin Oct 02 '17 at 19:59
  • what about upgrade to the latest version? It will be slow, but you can try :-) And log tables can be truncated and repaired. – Pavel Novitsky Oct 02 '17 at 20:07
  • Pavel Novitsky: This is interesting what you just suggested! You mean I could upgrade the 1.3.1 version to let's say 1.9.1? That's worth trying...How would I do that and what happens with the design template? (I have Porto on there) – Allysin Oct 02 '17 at 20:20
  • it's not such an easy task, database structure and classes changed moderately. Backup everything, switch to the default theme (many templates and layouts changed), get files of the latest 1.9 version and point this 1.9 store to use the old database. Hopefully this will upgrade the data and you'll have fresh magento 1.9 installation with all products, orders, inages, etc from old version. I don't know about your customizations, but most of them won't be compatible with the latest version. Porto theme is updated with every magento version and you can get suitable for you. But it's not trivial – Pavel Novitsky Oct 02 '17 at 20:36
  • Pavel Novitsky: That sounds really complicated or are you saying to 1. install a fresh install of Magento 1.9.x and then just tell it to read the existing database? and then install the Porto theme again? I have the "Softaculous Apps Installer" in my cPanel and I think it allows for upgrading Magento....I've tried this once before though and I don't think it worked....What do you think about that? – Allysin Oct 02 '17 at 20:50
0

mysqlcheck --repair --all-databases

OR

enter image description here

MHK Developer
  • 402
  • 3
  • 14