i have a problem with my admin page. after i login to admin, suddenly it show an error message..
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'sinergi_luki.captcha_log' doesn't exist
is it because i migrate my magento 1.5.0.1 to a new server but in a new server i install magento 1.7.0.0..? or why? give me a solution guys. Thanks!
Sadly, there's no magic answer for you other than: Next time migrate Magento correctly.
The system on your new server has code that references a custom database table, sinergi_luki
. This table did not make the trip over to your new server from the old. It's also not a part of the base magento installation. The word sinergi is, according to Google translate, Indonesian for synergies, and Luki appears to be an Indonesian name, so my guess is the previous developer built some custom functionality without including database migrations.
You should find the old database, export this table, and pull it back into your new system. Outside of that you're SOL.
Good luck.
sinergi_luki
is a reference to the root folder name of the magento installation, nothing more.
We upgraded from 1.4.2 to 1.5 to 1.6 to 1.7.0.1 (ssh upgrade) no problems except for the error that comes up when logging in:
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'apezooc_magento.captcha_log' doesn't exist
Hit Enter again and the error should disappear, and we get into the admin section.
Create an sql file with the following code, and import it into your database.
-- Server version 5.5.9
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `captcha_log`
--
DROP TABLE IF EXISTS `captcha_log`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `captcha_log` (
`type` varchar(32) NOT NULL COMMENT 'Type',
`value` varchar(32) NOT NULL COMMENT 'Value',
`count` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Count',
`updated_at` timestamp NULL DEFAULT NULL COMMENT 'Update Time',
PRIMARY KEY (`type`,`value`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Count Login Attempts';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `captcha_log`
--
LOCK TABLES `captcha_log` WRITE;
/*!40000 ALTER TABLE `captcha_log` DISABLE KEYS */;
/*!40000 ALTER TABLE `captcha_log` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2012-07-10 14:41:53
Mage_Captcha is a new core module provided as of Magento 1.7.0, and the install script seems to be named incorrectly.
Rename app/code/core/Mage/Captcha/sql/captcha_setup/install-1.7.0.0.0.php to mysql4-install-1.7.0.0.0.php, then Flush Cache Storage from Cache Management.
I'm not sure whether the Magento devs are implementing a new standard for install scripts that doesn't require the 'mysql4-' prefix, but if so it didn't work when I upgraded to 1.7.0.2 so renaming this file does the trick.
The problem occurs due to captcha module installation script not run/executed. To solve this issue just remove entry of 'captcha_setup'
from 'core_resource'
table OR
delete FROM core_resource where code='captcha_setup';
and refresh the browser