0

在共享服务器上安装 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 论坛上,但没有运气。

有任何想法吗?

4

5 回答 5

4

就我而言,这是关于超时问题。

  1. 消除var/.maintenance.flag
  2. 删除app/etc/config.php&env.php
  3. 清理你的数据库。
  4. php.ini, 集max_execution_time=500
  5. 再次运行 yourmagento.com

完毕。

于 2016-04-08T16:14:27.447 回答
0

确保您的 php memory_limit 应该足够,例如 2028M。这对我有帮助。

于 2016-06-10T10:03:41.440 回答
0
  1. 转到 PHP 根目录中的 php.ini 文件。(我的是 c:\php\php.ini
  2. 查找max_execution_time并设置为 200 或 300。(我原来是 60
  3. 转到您创建的数据库,删除所有表。
  4. 重新启动您的服务器。(我的是阿帕奇
  5. 重复安装步骤。

祝你好运。

于 2016-07-12T04:45:06.863 回答
0
  • max_execution_time 500

  • 如果您使用的是虚拟机,请尝试增加您的内存

  • 重新启动安装。

问候,

于 2018-06-03T22:42:34.260 回答
0

我遇到了同样的问题。Magento 安装停止Installing data..

运行此脚本sudo php bin/magento setup:static-content:deploy

它帮助我和 magento 网站开始工作。(我刚刚关闭了安装页面)

于 2017-05-19T13:57:29.943 回答