【发布时间】:2016-02-05 07:19:02
【问题描述】:
在共享服务器上安装 Magento 2 时,我一直在做噩梦。问题是我对共享服务器没有问题。我可以获得 Magento 需要的尽可能多的资源和配置。
但它卡在 66%,这是控制台日志:
Module 'Magento_Directory':
Installing data..
[ERROR] exception 'Exception' with message 'Warning: Error while sending QUERY packet. PID=47710 in
/home/gottstor/public_html/store/vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php on line 228' in /home/gottstor/public_html/store/vendor/magento/framework/App/ErrorHandler.php:61
Stack trace:
#0 [internal function]: Magento\Framework\App\ErrorHandler->handler(2, 'Error while sen...', '/home/gottstor/...', 228, Array)
#1 /home/gottstor/public_html/store/vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php(228): PDOStatement->execute(Array)
#2 /home/gottstor/public_html/store/vendor/magento/framework/DB/Statement/Pdo/Mysql.php(95): Zend_Db_Statement_Pdo->_execute(Array)
#3 /home/gottstor/public_html/store/vendor/magento/zendframework1/library/Zend/Db/Statement.php(303): Magento\Framework\DB\Statement\Pdo\Mysql->_execute(Array)
#4 /home/gottstor/public_html/store/vendor/magento/zendframework1/library/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)
我确实将它安装在本地主机上,没有任何问题。但不能让它在共享主机上工作。
最大执行时间设置为 60,MySQL 中允许的最大数据包设置为 268M,max_input_vars 5000,memory_limit 512M。
我已经搜索了网络,发布在 Magento 论坛上,但没有运气。
有什么想法吗?
【问题讨论】:
-
这不是解决方案,但 max_execution_time 应该设置为 60 以上,我建议 Magento 网站设置为 300...
-
将memory_limit增加到至少768M
-
@SteveJohnson - 我的本地 php 上的 memory_limit 设置为 128M 并且 Magento 2 安装顺利。如果 Magento 安装时设置为 128M,那么在主机上设置 768M 有什么意义?
-
我不能确切地告诉你,但安装示例数据或导入产品之类的事情会消耗大量内存。
-
@SteveJohnson 感谢您的回复,事实是我正在安装 Magento 2,没有示例数据。这就是我感到困惑的原因。
标签: php mysql magento magento2 magento-2.0