将symfony 2应用程序推送到heroku,由远程主机关闭

时间:2014-06-30 18:46:12

标签: php symfony heroku

我想把我的应用程序在Symfony 2 PHP中写入heroku服务器。我使用Ubuntu 14.04。当我推开我的应用程序时,我看到:

-----> PHP app detected

 !     WARNING: Your composer.json requires an unknown PHP version.
       Defaulting to PHP 5.5.14; install may fail!
       See https://devcenter.heroku.com/categories/php

-----> Setting up runtime environment...
       - PHP 5.5.14
       - Apache 2.4.9
       - Nginx 1.4.6
-----> Installing PHP extensions:
       - opcache (automatic; bundled, using 'ext-opcache.ini')
-----> Installing dependencies...
       Composer version 745dcbce3317f7119575c39cef2cb601f9c5ffcf 2014-06-29 16:49:45
Connection to 10.179.144.249 closed by remote host.
, done.
error: did not receive remote status

也许这是我的互联网服务提供商的错误?

更新 我的项目目录中有omposer.lock,我的composer.json是:

{
    "name": "symfony/framework-standard-edition",
    "license": "MIT",
    "type": "project",
    "description": "The \"Symfony Standard Edition\" distribution",
    "autoload": {
        "psr-0": { "": "src/" }
    },
    "require": {
        "php": ">=5.3.3",
        "symfony/symfony": "~2.4",
        "doctrine/orm": "~2.2,>=2.2.3",
        "doctrine/doctrine-bundle": "~1.2",
        "twig/extensions": "~1.0",
        "symfony/assetic-bundle": "~2.3",
        "symfony/swiftmailer-bundle": "~2.3",
        "symfony/monolog-bundle": "~2.4",
        "sensio/distribution-bundle": "~2.3",
        "sensio/framework-extra-bundle": "~3.0",
        "sensio/generator-bundle": "~2.3",
        "incenteev/composer-parameter-handler": "~2.0",
        "dvelopment/firephp-bundle": "dev-master",
        "symfony/serializer": "2.5.*@dev",
        "liip/imagine-bundle": "dev-master",
        "luxifer/doctrine-functions": "dev-master"
    },
    "scripts": {
        "post-install-cmd": [
            "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile"
        ],
        "post-update-cmd": [
            "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile"
        ]
    },
    "config": {
        "bin-dir": "bin"
    },
    "extra": {
        "symfony-app-dir": "app",
        "symfony-web-dir": "web",
        "symfony-assets-install": "symlink",
        "incenteev-parameters": {
            "file": "app/config/parameters.yml"
        },
        "branch-alias": {
            "dev-master": "2.4-dev"
        }
    }
}

2 个答案:

答案 0 :(得分:0)

您指定的是他们不支持的php版本

支持的版本 PHP 5.5.11 5.5.12 5.5.13 5.5.14(默认)

https://devcenter.heroku.com/articles/php-support

修改您的composer.json并将其更改为~5.5.11

这也可能对您有所帮助:

https://devcenter.heroku.com/articles/getting-started-with-symfony2

答案 1 :(得分:0)

看起来您的ISP在几秒钟后关闭了连接。您是否尝试过运行time git push heroku master几次以查看它是否总是在相同的时间后停止("真实"是您应该注意的值)?