Magento 2.0.2在共享服务器上安装 - 坚持66%

时间:2016-02-05 07:19:02

标签: php mysql magento magento2 magento-2.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)

我确实在localhost上安装了它,没有任何问题。但无法在共享主机上运行它。

最大执行时间设置为60,MySQL中允许的最大数据包设置为268M,max_input_vars 5000,memory_limit 512M。

我在网上搜索过,发布在Magento论坛上,没有运气。

有什么想法吗?

5 个答案:

答案 0 :(得分:2)

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

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

答案 1 :(得分:0)

确保你的php memory_limit足够,比如2028M。 这有助于我的情况。

答案 2 :(得分:0)

  1. 转到PHP根目录中的php.ini文件。 (我的是c:\ php \ php.ini
  2. 查找max_execution_time并设置为200或300.(我的原作是60
  3. 转到创建的数据库,删除所有表格。
  4. 重新启动服务器。 (我的是apache
  5. 重复您的安装步骤。
  6. 祝你好运。

答案 3 :(得分:0)

我遇到了同样的问题。 Magento安装停在htmlspecialchars()

运行此脚本Installing data..

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

答案 4 :(得分:0)

  • max_execution_time 500

  • 如果您使用虚拟机

  • ,请尝试增加您的内存
  • 重新启动安装。

此致