gpt4 book ai didi

php - Magento - 基表 core_file_storage 不存在

转载 作者:可可西里 更新时间:2023-11-01 07:12:07 24 4
gpt4 key购买 nike

当我查看我的 Magento 商店的错误日志时,它充满了这些错误:

[02-Jun-2011 13:49:12] PHP Fatal error:  Uncaught exception 'PDOException' with message 'SQLSTATE[42S02]: Base table or view not found: 1146 Table 'mysite_mysite.core_file_storage' doesn't exist' in /home/mysite/public_html/lib/Zend/Db/Statement/Pdo.php:228
Stack trace:
#0 /home/mysite/public_html/lib/Zend/Db/Statement/Pdo.php(228): PDOStatement->execute(Array)
#1 /home/mysite/public_html/lib/Zend/Db/Statement.php(300): Zend_Db_Statement_Pdo->_execute(Array)
#2 /home/mysite/public_html/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#3 /home/mysite/public_html/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SELECT `e`.* FR...', Array)
#4 /home/mysite/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(337): Zend_Db_Adapter_Pdo_Abstract->query('SELECT `e`.* FR...', Array)
#5 /home/mysite/public_html/lib/Zend/Db/Adapter/Abstract.php(753): Varien_Db_Adapter_Pdo_Mysql->query(Object(Varien_Db_Select), Array)
#6 /home/mysite/public_html/app/code/core/Mage/Core/Model/Mysql4/File/Storag in /home/mysite/public_html/lib/Zend/Db/Statement/Pdo.php on line 234

有人知道怎么解决吗?

最佳答案

显然我还没有对 Daniel 的回答发表评论的特权,因此我将其添加为一个单独的回答。用户 a1anm 也在 Magento 论坛上提出了这个问题。在那里,用户 furnitureforyoultd 用 two different queries 回答了这个问题。 .

首先,如果您还没有 core_directory_storage,请运行:

CREATE TABLE `core_directory_storage` (
`directory_id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`name` VARCHAR(255) NOT NULL DEFAULT '',
`path` VARCHAR(255) NOT NULL DEFAULT '',
`upload_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
`parent_id` INT(10) UNSIGNED NULL DEFAULT NULL,
PRIMARY KEY (`directory_id`),
UNIQUE INDEX `IDX_DIRECTORY_PATH` (`name`, `path`),
INDEX `parent_id` (`parent_id`),
CONSTRAINT `FK_DIRECTORY_PARENT_ID` FOREIGN KEY (`parent_id`) REFERENCES `core_directory_storage` (`directory_id`) ON UPDATE CASCADE ON DELETE CASCADE
) COMMENT='Directory storage' COLLATE='utf8_general_ci' ENGINE=InnoDB ROW_FORMAT=DEFAULT;

然后,运行:

CREATE TABLE `core_file_storage` (
`file_id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`content` LONGBLOB NOT NULL,
`upload_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
`filename` VARCHAR(255) NOT NULL DEFAULT '',
`directory_id` INT(10) UNSIGNED NULL DEFAULT NULL,
`directory` VARCHAR(255) NULL DEFAULT NULL,
PRIMARY KEY (`file_id`),
UNIQUE INDEX `IDX_FILENAME` (`filename`, `directory`),
INDEX `directory_id` (`directory_id`),
CONSTRAINT `FK_FILE_DIRECTORY` FOREIGN KEY (`directory_id`) REFERENCES `core_directory_storage` (`directory_id`) ON UPDATE CASCADE ON DELETE CASCADE
) COMMENT='File storage' COLLATE='utf8_general_ci' ENGINE=InnoDB ROW_FORMAT=DEFAULT;

关于php - Magento - 基表 core_file_storage 不存在,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6215609/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com