2016-11-26 6 views
2

私はHeroku上のステージングインスタンスに新しい展開をプッシュしましたが、これは失敗しました。私のサイトからは500エラーが発生しています。HerokuでXdebugを実行するには?

composer.json

{ 
    "license": "proprietary", 
    "require": { 
     "php": ">=5.5.16", 
     "aws/aws-sdk-php": "2.*", 
     "ext-memcached": "*", 
     "ext-apcu": "*", 
     "ext-gd": "*", 
     "ext-gettext": "*", 
     "ext-mbstring": "*", 
     "ext-soap": "*", 
     "ext-mysql": "*", 
     "ext-xdebug": ">=2.4.0" 
    }, 
    "require-dev": { 
     "heroku/heroku-buildpack-php": "*" 
    } 
} 

新しいPHPコード:

// STARTS DEBUG 
xdebug_start_function_monitor(['session_start']); 

register_shutdown_function(function() { 
    var_dump(xdebug_get_monitored_functions(), ini_get('session.auto_start')); 
}); 
// ENDS DEBUG 

Herokuのログを構築:

-----> PHP app detected 
-----> Bootstrapping... 
-----> Installing platform packages... 
     - php (5.5.38) 
     - ext-gd (bundled with php) 
     - ext-gettext (bundled with php) 
     - ext-mbstring (bundled with php) 
     - ext-mysql (bundled with php) 
     - ext-soap (bundled with php) 
     - ext-apcu (4.0.11) 
     - ext-memcached (2.2.0) 
     - apache (2.4.20) 
     - nginx (1.8.1) 
!  WARNING: Your 'composer.lock' is not up to date with the latest 
     changes in 'composer.json'. To ensure you are not getting stale 
     dependencies, run 'composer update' on your machine and commit 
     any changes to Git before pushing again. 
-----> Installing dependencies... 
     Composer version 1.2.2 2016-11-03 17:43:15 
     Loading composer repositories with package information 
     Installing dependencies from lock file 
     Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. Run update to update them. 
     - Installing symfony/event-dispatcher (v2.6.1) 
      Loading from cache 

     - Installing guzzle/guzzle (v3.9.2) 
      Loading from cache 

     - Installing aws/aws-sdk-php (2.7.12) 
      Loading from cache 

     Generating optimized autoload files 
-----> Preparing runtime environment... 
-----> Checking for additional extensions to install... 
     - New Relic detected, installed ext-newrelic 
-----> Discovering process types 
     Procfile declares types -> web 
-----> Compressing... 
     Done: 112.1M 
-----> Launching... 
     Released v792 
     https://XXX.herokuapp.com/ deployed to Heroku 

私の知る限り、ビルドログから理由を見ることができるようにXdebugがインストールされていないのは、私がcomposer.jsonで指定したにもかかわらず、失敗しているからです。

XdebugをHerokuにインストールするにはどうすればよいですか?

+0

ビルドが正常に完了したように見えます。 HTTP 500は一般的なエラーメッセージです。 [アプリケーションログを確認する](https://devcenter.heroku.com/articles/logging#log-retrieval)と彼らの発言を確認する必要があります。 – Chris

+0

@Chris私は何も教えてくれなかったアプリケーションのログを見てきましたが、なぜ動作していないのかは、XDebugがインストールされていない(コンポーザーにあっても) .json)。私はXDebugが本当にこのエラーメッセージでインストールされていないことを確認しました: '致命的なエラー:定義されていない関数xdebug_start_function_monitor()を呼び出す。 ' –

+0

@Chris、それは質問の最初のブロックです。 –

答えて

3

XdebugはHerokuではサポートされていないようです。 Herokuののドキュメントはsix lists of extensionsを提供しています。

  • PHP 5.5および5.6のための3つのリスト:自動的composer.json
  • サードを通じて有効にすることができます
  • 内蔵の拡張機能を有効にしている
    • 内蔵の拡張機能有効にできるパーティー拡張機能は、composer.json
  • 3つのcorrespondingp PHP 7のondingリスト

Xdebugのリストはありません。

関連する問題