3

私は(初めて)capifonyを使用してgithubリポジトリからサイトをデプロイしようとしています。セットアップフェーズまで実行され、次のエラーが発生します。

** [out :: example.me] PHP Warning:  require_once(/var/www/example/prod/releases/20111208212344/app/bootstrap.php.cache): failed to open stream: No such file or directory in /var/www/example/prod/releases/20111208212344/app/console on line 4
 ** [out :: example.me] PHP Fatal error:  require_once(): Failed opening required '/var/www/example/prod/releases/20111208212344/app/bootstrap.php.cache' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/example/prod/releases/20111208212344/app/console on line 4
 ** [out :: example.me] PHP Warning:  require_once(/var/www/example/prod/releases/20111208212344/app/bootstrap.php.cache): failed to open stream: No such file or directory in /var/www/example/prod/releases/20111208212344/app/console on line 4
 ** [out :: example.me] PHP Fatal error:  require_once(): Failed opening required '/var/www/example/prod/releases/20111208212344/app/bootstrap.php.cache' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/example/prod/releases/20111208212344/app/console on line 4
    command finished in 106300ms
  * executing `symfony:assets:install'
  * executing "cd /var/www/example/prod/releases/20111208212344 && php app/console assets:install web --env=prod"
    servers: ["example.me"]
    [example.me] executing command
 ** [out :: example.me] PHP Warning:  require_once(/var/www/example/prod/releases/20111208212344/app/bootstrap.php.cache): failed to open stream: No such file or directory in /var/www/example/prod/releases/20111208212344/app/console on line 4
 ** [out :: example.me] PHP Fatal error:  require_once(): Failed opening required '/var/www/example/prod/releases/20111208212344/app/bootstrap.php.cache' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/example/prod/releases/20111208212344/app/console on line 4
    command finished in 1294ms
*** [deploy:update_code] rolling back
  * executing "rm -rf /var/www/example/prod/releases/20111208212344; true"
    servers: ["example.me"]
    [example.me] executing command
    command finished in 1329ms
failed: "sh -c 'cd /var/www/example/prod/releases/20111208212344 && php app/console assets:install web --env=prod'" on example.me

誰かがこれを奨励しましたか?原因となる可能性のあるアイデアはありますか?

4

2 に答える 2

1

これは、ベンダーディレクトリへのシンボリックリンクと関係があります。詳細なソリューションは次のとおりです: https ://github.com/symfony/symfony-standard/pull/215

于 2011-12-09T09:52:07.293 に答える
0

私はしばらくこれに固執していました、それがまったく同じ問題であるかどうかはわかりません。vi Capifonyをデプロイしたとき、bootstrap.php.cacheファイルはFormBundle.phpファイルを指していたが、以前のリリースフォルダーにはもう存在していなかった。私はvendor/sensio / distribution-bundle / Sensio / Bundle / DistributionBundle / Resources / bin / build_bootstrap.phpのコードを見て、それが使用するパスはrealpath(DIR。'/../../../ ../../../../../app')-ハードコードされたパス、wtf?これに伴う問題は、ベンダーフォルダーが共有フォルダー内のmySymfonyセットアップの外にあるため、realpathが何も役に立たないことを示していることです。

ただし、コードの少し上にあるサーバー変数($ _SERVER('argv'))をチェックするので、これをファイルに追加するvhostsで設定します:SetEnv argv / var / www / njc-forms /現在

それが誰かを助けてくれることを願っています。

于 2015-01-20T21:58:25.647 に答える