我在共享服务器上安装 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 论坛上发帖,但没有成功。
有什么想法吗?
最佳答案
就我而言,这是关于超时问题。
- 删除
var/.maintenance.flag
- 删除
app/etc/config.php
&env.php
- 清理你的数据库。
- 在
php.ini
中,设置max_execution_time=500
- 再次运行 yourmagento.com
完成。
关于php - 共享服务器上的 Magento 2.0.2 安装 - 卡在 66%,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35218372/