teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

5

2019/11/19 03:31

投稿

youth_k0228
youth_k0228

スコア18

title CHANGED
File without changes
body CHANGED
@@ -1,9 +1,26 @@
1
1
  こんにちは。
2
2
  PHPで作成したアプリケーションをherokuサーバーに上げてみましたが、取得したURLや「OPEN APP]をクリックしても、「Application ERROR」と画面に表れてしまいました。
3
3
 
4
- ログを確認すると、「ドキュメントルートが存在しません。」という旨のエラーメッセージを確認しました。
4
+ ログを確認すると、下記のエラーを確認しました。
5
- そこで検索をかけ調査し、ProcfileとHtaccessファイルの作成とドキュメントルートの設定を試みましたが、結果は変わりませんでした。
5
+ ```herokuLOG
6
6
 
7
+ 2019-11-14T15:06:23.658227+00:00 heroku[web.1]: Process exited with status 1
8
+ 2019-11-14T15:07:09.221898+00:00 heroku[web.1]: State changed from crashed to starting
9
+ 2019-11-14T15:07:10.773514+00:00 heroku[web.1]: Starting process with command `vendor/bin/heroku-php-apache2 works\custombbs`
10
+ 2019-11-14T15:07:14.075422+00:00 heroku[web.1]: State changed from starting to crashed
11
+ 2019-11-14T15:07:14.062659+00:00 heroku[web.1]: Process exited with status 1
12
+ 2019-11-14T15:07:14.012584+00:00 app[web.1]: DOCUMENT_ROOT 'workscustombbs' does not exist
13
+
14
+ ```
15
+
16
+ これを踏まえ、下記のことをこれまで行いました。
17
+ ①Htaccessの作成
18
+ ②Procfileで指定するパスの修正(フルパス、ディレクトリセパレータをLinux形式にする)
19
+ ③composer.jsonの内容の記述とcomposer update
20
+ ④Procfileとcomposer.jsonをプロジェクトフォルダの前に移動
21
+ ⑤login.phpに「require (‘autoload.phpまでのフルパス’)」の追記
22
+ ⑥DOC_ROOTをプロジェクトフォルダまでのフルパスに設定
23
+
7
24
  以下、ファイルを置いた場所と、Procfile、Htaccess、設定したドキュメントルートです。
8
25
 
9
26
  ```ソースツリー
@@ -30,47 +47,6 @@
30
47
  RewriteCond %{REQUEST_FILENAME} !-f
31
48
  RewriteRule ^ login.php [QSA,L]
32
49
  ```
33
-
34
-
35
- 19/11/13修正
36
- Procfileを「Apache2」を「Apache」に変更したところ、以下のエラーが発生しました。
37
- ```ERRORlog
38
- bash: vendor/bin/heroku-php-apache: No such file or directory
39
- ```
40
-
41
- これは、Composer.jsonの中身が設定されていないからでは。と考え、Composer.jsonに以下の記述を加え、回答者様からいただいたご指摘を元に、composer updateを行いました。
42
- ```
43
- {
44
- "require": {
45
- "php": "~7.3.9"
46
- },
47
- "require-dev": {
48
- "heroku/heroku-buildpack-php":"*"
49
- }
50
- }
51
- ```
52
- composerの設定は上手く出来ましたが、上記のエラーを解消することは出来ませんでした。
53
- 又、vendorフォルダが生成された際、以下の警告文が現れました。
54
- ```vendorWARNING
55
- remote: ! WARNING: Composer vendor dir found in project!
56
- remote: !
57
- remote: ! Your Git repository contains Composer's 'vendor' directory.
58
- remote: !
59
- remote: ! This directory should not be under version control; only your
60
- remote: ! 'composer.json' and 'composer.lock' files need to be added, as
61
- remote: ! Composer will handle installation of dependencies on deploy.
62
- remote: !
63
- remote: ! To suppress this notice, first remove the folder from the index
64
- remote: ! by running 'git rm -r --cached vendor/'.
65
- remote: ! Next, edit your project's '.gitignore' file and add the folder
66
- remote: ! '/vendor/' to the list, then commit the changes.
67
- remote: !
68
- remote: ! For more info, refer to the Composer FAQ: http://bit.ly/1rlCSZU
69
- remote:
70
- ```
71
-
72
- そこで指示に出ている通り、「git rm -r --cached vendor/」を実行し、.gitignore「/vendor/」の記述を加えコミットしましたが、エラーは解消されませんでした。
73
-
74
50
  11/15 追記
75
51
  heroku openした際に生成されたコマンドを確認しました。
76
52
  ```heroku-php-apache2
@@ -96,4 +72,4 @@
96
72
  2.この「To success」以降の指示の他に設定しなければならないことはございますか。
97
73
  3.上記の「heroku-php-apache2」コマンドにエラーや不備はありますか。
98
74
 
99
- 質問が途中で変わってしまい大変申し訳ありませんが、ご教授・ご指摘をお願いいたします。apache
75
+ 質問が途中で変わってしまい大変申し訳ありませんが、ご教授・ご指摘をお願いいたします。

4

エラーログと質問の追加

2019/11/19 03:31

投稿

youth_k0228
youth_k0228

スコア18

title CHANGED
File without changes
body CHANGED
@@ -71,8 +71,29 @@
71
71
 
72
72
  そこで指示に出ている通り、「git rm -r --cached vendor/」を実行し、.gitignore「/vendor/」の記述を加えコミットしましたが、エラーは解消されませんでした。
73
73
 
74
+ 11/15 追記
75
+ heroku openした際に生成されたコマンドを確認しました。
76
+ ```heroku-php-apache2
77
+ #!/usr/bin/env sh
78
+
79
+ dir=$(cd "${0%[/\]*}" > /dev/null; cd "../heroku/heroku-buildpack-php/bin" && pwd)
80
+
81
+ if [ -d /proc/cygdrive ]; then
82
+ case $(which php) in
83
+ $(readlink -n /proc/cygdrive)/*)
84
+ # We are in Cygwin using Windows php, so the path must be translated
85
+ dir=$(cygpath -m "$dir");
86
+ ;;
87
+ esac
88
+ fi
89
+
90
+ "${dir}/heroku-php-apache2" "$@"
91
+
92
+ ```
93
+
74
94
  質問ですが、
75
95
  1.Composerの設定で何か記述しなければならない文言や、作成しなければならないファイルはありますか。
76
96
  2.この「To success」以降の指示の他に設定しなければならないことはございますか。
97
+ 3.上記の「heroku-php-apache2」コマンドにエラーや不備はありますか。
77
98
 
78
- 質問が途中で変わってしまい大変申し訳ありませんが、ご教授・ご指摘をお願いいたします。
99
+ 質問が途中で変わってしまい大変申し訳ありませんが、ご教授・ご指摘をお願いいたします。apache

3

2019/11/14 15:39

投稿

youth_k0228
youth_k0228

スコア18

title CHANGED
File without changes
body CHANGED
@@ -1,5 +1,4 @@
1
1
  こんにちは。
2
-
3
2
  PHPで作成したアプリケーションをherokuサーバーに上げてみましたが、取得したURLや「OPEN APP]をクリックしても、「Application ERROR」と画面に表れてしまいました。
4
3
 
5
4
  ログを確認すると、「ドキュメントルートが存在しません。」という旨のエラーメッセージを確認しました。
@@ -7,6 +6,7 @@
7
6
 
8
7
  以下、ファイルを置いた場所と、Procfile、Htaccess、設定したドキュメントルートです。
9
8
 
9
+ ```ソースツリー
10
10
  htdocs
11
11
  |
12
12
  works
@@ -16,8 +16,11 @@
16
16
  └── login.php
17
17
  └── composer.json
18
18
  └── Procfile
19
+ ```
19
20
 
21
+ ```ドキュメントルート
20
- ドキュメントルート:DOC_ROOT=htdocs/works/custombbs
22
+ DOC_ROOT=htdocs/works/custombbs
23
+ ```
21
24
 
22
25
  ```Procfile
23
26
  web: vendor/bin/heroku-php-apache2 htdocs/works/custombbs

2

質問内容、およびエラー等状況を変更いたしました。

2019/11/13 03:56

投稿

youth_k0228
youth_k0228

スコア18

title CHANGED
@@ -1,1 +1,1 @@
1
- herokuに上げたPHPアプリがApplication ERRORになってしまう(設定したドキュメントルート認証されない
1
+ herokuvendor/bin/heroku-php-apache: No such file or directory」が解消されない
body CHANGED
@@ -27,62 +27,28 @@
27
27
  RewriteCond %{REQUEST_FILENAME} !-f
28
28
  RewriteRule ^ login.php [QSA,L]
29
29
  ```
30
- アプリケーションをherokuで起動させるために、この他に設定しなければならないファイルは何でしょうか。
31
- 又、ProcfileやComposer.json等で記述しなければならないものや不備はありますか。
32
- すみませんが、ご教授をお願いいたします。
33
30
 
31
+
34
- 19/11/12追記
32
+ 19/11/13修正
35
33
  Procfileを「Apache2」を「Apache」に変更したところ、以下のエラーが発生しました。
36
34
  ```ERRORlog
37
35
  bash: vendor/bin/heroku-php-apache: No such file or directory
38
36
  ```
39
37
 
40
- これは、Composer.jsonの中身が設定されていないからでは。と考え、Composer.jsonに以下の記述を加え、Composerインストールしました。
38
+ これは、Composer.jsonの中身が設定されていないからでは。と考え、Composer.jsonに以下の記述を加え、回答者様からいただいたご指摘元に、composer updateを行いました。
41
39
  ```
42
40
  {
43
41
  "require": {
42
+ "php": "~7.3.9"
43
+ },
44
+ "require-dev": {
44
- "heroku/heroku-buildpack-php":"*
45
+ "heroku/heroku-buildpack-php":"*"
45
46
  }
46
47
  }
47
48
  ```
48
-
49
- vendorファイルプロジェクト内に作成され以下のエラーを出し、pushが出なくなってしいました。
49
+ composerの設定は上手く出来ましたが、上記のエラーを解消することは出来ませんでした。
50
+ 又、vendorフォルダが生成された際、以下の警告文が現れました。
50
- ```ERRORlog
51
+ ```vendorWARNING
51
- remote: ! WARNING: Your 'composer.lock' is out of date!
52
- remote: !
53
- remote: ! The 'composer.lock' file in your project is not up to date with
54
- remote: ! the main 'composer.json' file. This may result in installation
55
- remote: ! of incorrect packages or package versions.
56
- remote: !
57
- remote: ! The lock file is required in order to guarantee reliable and
58
- remote: ! reproducible installation of dependencies across systems and
59
- remote: ! deploys. It must always be kept in sync with 'composer.json'.
60
- remote: !
61
- remote: ! Whenever you change 'composer.json', ensure that you perform
62
- remote: ! the following steps locally on your computer:
63
- remote: ! 1) run 'composer update'
64
- remote: ! 2) add all changes using 'git add composer.json composer.lock'
65
- remote: ! 3) commit using 'git commit'
66
- remote: !
67
- remote: ! Ensure that you updated the lock file correctly, and that you
68
- remote: ! ran 'git add' on both files, before deploying again.
69
- remote: !
70
- remote: ! Please remember to always keep your 'composer.lock' updated in
71
- remote: ! lockstep with 'composer.json' to avoid common problems related
72
- remote: ! to dependencies during collaboration and deployment.
73
- remote: !
74
- remote: ! Please refer to the Composer documentation for further details:
75
- remote: ! https://getcomposer.org/doc/
76
- remote: ! https://getcomposer.org/doc/01-basic-usage.md
77
- remote:
78
- remote: -----> Installing platform packages...
79
- remote: NOTICE: No runtime required in composer.lock; using PHP ^7.0.0
80
- remote: - php (7.3.11)
81
- remote: - apache (2.4.41)
82
- remote: - nginx (1.16.1)
83
- remote: -----> Installing dependencies...
84
- remote: Composer version 1.9.0 2019-08-02 20:55:32
85
- remote:
86
52
  remote: ! WARNING: Composer vendor dir found in project!
87
53
  remote: !
88
54
  remote: ! Your Git repository contains Composer's 'vendor' directory.
@@ -98,110 +64,12 @@
98
64
  remote: !
99
65
  remote: ! For more info, refer to the Composer FAQ: http://bit.ly/1rlCSZU
100
66
  remote:
101
- remote:
102
- remote: ! ERROR: Package 'heroku/heroku-buildpack-php' found!
103
- remote: !
104
- remote: ! Your 'composer.json' requires 'heroku/heroku-buildpack-php' in
105
- remote: ! the 'require' section. This package may only be used as a
106
- remote: ! dependency in 'require-dev', because Heroku installs the latest
107
- remote: ! version of the buildpack during builds.
108
- remote: !
109
- remote: ! Please perform the following steps locally on your computer to
110
- remote: ! resolve this issue before attempting another deploy:
111
- remote: ! 1) move the requirement for 'heroku/heroku-buildpack-php' from
112
- remote: ! section 'require' to 'require-dev' in 'composer.json'
113
- remote: ! 2) run 'composer update' to re-generate the lock file
114
- remote: ! 3) stage changes using 'git add composer.json composer.lock'
115
- remote: ! 4) commit changes using 'git commit'
116
- remote: !
117
- remote: ! REMINDER: the following warnings were emitted during the build;
118
- remote: ! check the details above, as they may be related to this error:
119
- remote: ! - Your 'composer.lock' is out of date!
120
- remote: ! - Composer vendor dir found in project!
121
- remote:
122
- remote: ! Push rejected, failed to compile PHP app.
123
- remote:
124
- remote: ! Push failed
125
- remote: Verifying deploy...
126
- remote:
127
- remote: ! Push rejected to custombbs.
128
67
  ```
129
68
 
130
- ```buildlog
131
- -----> PHP app detected
132
- -----> Bootstrapping...
133
- ! WARNING: Your 'composer.lock' is out of date!
134
- !
135
- ! The 'composer.lock' file in your project is not up to date with
136
- ! the main 'composer.json' file. This may result in installation
137
- ! of incorrect packages or package versions.
138
- !
139
- ! The lock file is required in order to guarantee reliable and
140
- ! reproducible installation of dependencies across systems and
141
- ! deploys. It must always be kept in sync with 'composer.json'.
142
- !
143
- ! Whenever you change 'composer.json', ensure that you perform
144
- ! the following steps locally on your computer:
145
- ! 1) run 'composer update'
146
- ! 2) add all changes using 'git add composer.json composer.lock'
147
- ! 3) commit using 'git commit'
148
- !
149
- ! Ensure that you updated the lock file correctly, and that you
150
- ! ran 'git add' on both files, before deploying again.
151
- !
152
- ! Please remember to always keep your 'composer.lock' updated in
153
- ! lockstep with 'composer.json' to avoid common problems related
154
- ! to dependencies during collaboration and deployment.
155
- !
156
- ! Please refer to the Composer documentation for further details:
157
- ! https://getcomposer.org/doc/
158
- ! https://getcomposer.org/doc/01-basic-usage.md
159
- -----> Installing platform packages...
160
- NOTICE: No runtime required in composer.lock; using PHP ^7.0.0
161
- - php (7.3.11)
162
- - apache (2.4.41)
163
- - nginx (1.16.1)
164
- -----> Installing dependencies...
165
- Composer version 1.9.0 2019-08-02 20:55:32
166
- ! WARNING: Composer vendor dir found in project!
167
- !
168
- ! Your Git repository contains Composer's 'vendor' directory.
169
- !
170
- ! This directory should not be under version control; only your
171
- ! 'composer.json' and 'composer.lock' files need to be added, as
172
- ! Composer will handle installation of dependencies on deploy.
173
- !
174
- ! To suppress this notice, first remove the folder from the index
175
- ! by running 'git rm -r --cached vendor/'.
176
- ! Next, edit your project's '.gitignore' file and add the folder
177
- ! '/vendor/' to the list, then commit the changes.
178
- !
179
- ! For more info, refer to the Composer FAQ: http://bit.ly/1rlCSZU
180
- ! ERROR: Package 'heroku/heroku-buildpack-php' found!
181
- !
182
- ! Your 'composer.json' requires 'heroku/heroku-buildpack-php' in
69
+ そこで指示に出ている通り、「git rm -r --cached vendor/」を実行し、.gitignore「/vendor/」の記述を加えコミットしましたが、エラーは解消されませんでした。
183
- ! the 'require' section. This package may only be used as a
184
- ! dependency in 'require-dev', because Heroku installs the latest
185
- ! version of the buildpack during builds.
186
- !
187
- ! Please perform the following steps locally on your computer to
188
- ! resolve this issue before attempting another deploy:
189
- ! 1) move the requirement for 'heroku/heroku-buildpack-php' from
190
- ! section 'require' to 'require-dev' in 'composer.json'
191
- ! 2) run 'composer update' to re-generate the lock file
192
- ! 3) stage changes using 'git add composer.json composer.lock'
193
- ! 4) commit changes using 'git commit'
194
- !
195
- ! REMINDER: the following warnings were emitted during the build;
196
- ! check the details above, as they may be related to this error:
197
- ! - Your 'composer.lock' is out of date!
198
- ! - Composer vendor dir found in project!
199
- ! Push rejected, failed to compile PHP app.
200
- ! Push failed
201
- ```
202
- 追加での質問で恐縮ですが、
203
- 1.DOCUMENTROOTを読み込まれないエラーとComposer.jsonの設定は関係ありますか。
204
- 2.Composer.jsonをインストールする際はプロジェクト内にvendorファイルを配置しないようにするものでしょうか。
205
- (その場合、どこにvendorファイルを置くものでしょうか。)
206
70
 
71
+ 質問ですが、
72
+ 1.Composerの設定で何か記述しなければならない文言や、作成しなければならないファイルはありますか。
73
+ 2.この「To success」以降の指示の他に設定しなければならないことはございますか。
74
+
207
- 質問が多くなってしまい大変恐縮ですが、ご教授をお願いいたします。
75
+ 質問が途中で変わってしまい大変申し訳ありませんが、ご教授・ご指摘をお願いいたします。

1

質問を2~3点追加

2019/11/12 15:33

投稿

youth_k0228
youth_k0228

スコア18

title CHANGED
@@ -1,1 +1,1 @@
1
- herokuに上げたPHPアプリが「Application ERROR」になってしまう
1
+ herokuに上げたPHPアプリが「Application ERROR」になってしまう(設定したドキュメントルートが認証されない)
body CHANGED
@@ -29,4 +29,179 @@
29
29
  ```
30
30
  アプリケーションをherokuで起動させるために、この他に設定しなければならないファイルは何でしょうか。
31
31
  又、ProcfileやComposer.json等で記述しなければならないものや不備はありますか。
32
- すみませんが、ご教授をお願いいたします。
32
+ すみませんが、ご教授をお願いいたします。
33
+
34
+ 19/11/12追記
35
+ Procfileを「Apache2」を「Apache」に変更したところ、以下のエラーが発生しました。
36
+ ```ERRORlog
37
+ bash: vendor/bin/heroku-php-apache: No such file or directory
38
+ ```
39
+
40
+ これは、Composer.jsonの中身が設定されていないからでは。と考え、Composer.jsonに以下の記述を加え、Composerをインストールしました。
41
+ ```
42
+ {
43
+ "require": {
44
+ "heroku/heroku-buildpack-php":"*
45
+ }
46
+ }
47
+ ```
48
+
49
+ vendorファイルがプロジェクト内に作成され、以下のエラーを出し、pushが出来なくなってしまいました。
50
+ ```ERRORlog
51
+ remote: ! WARNING: Your 'composer.lock' is out of date!
52
+ remote: !
53
+ remote: ! The 'composer.lock' file in your project is not up to date with
54
+ remote: ! the main 'composer.json' file. This may result in installation
55
+ remote: ! of incorrect packages or package versions.
56
+ remote: !
57
+ remote: ! The lock file is required in order to guarantee reliable and
58
+ remote: ! reproducible installation of dependencies across systems and
59
+ remote: ! deploys. It must always be kept in sync with 'composer.json'.
60
+ remote: !
61
+ remote: ! Whenever you change 'composer.json', ensure that you perform
62
+ remote: ! the following steps locally on your computer:
63
+ remote: ! 1) run 'composer update'
64
+ remote: ! 2) add all changes using 'git add composer.json composer.lock'
65
+ remote: ! 3) commit using 'git commit'
66
+ remote: !
67
+ remote: ! Ensure that you updated the lock file correctly, and that you
68
+ remote: ! ran 'git add' on both files, before deploying again.
69
+ remote: !
70
+ remote: ! Please remember to always keep your 'composer.lock' updated in
71
+ remote: ! lockstep with 'composer.json' to avoid common problems related
72
+ remote: ! to dependencies during collaboration and deployment.
73
+ remote: !
74
+ remote: ! Please refer to the Composer documentation for further details:
75
+ remote: ! https://getcomposer.org/doc/
76
+ remote: ! https://getcomposer.org/doc/01-basic-usage.md
77
+ remote:
78
+ remote: -----> Installing platform packages...
79
+ remote: NOTICE: No runtime required in composer.lock; using PHP ^7.0.0
80
+ remote: - php (7.3.11)
81
+ remote: - apache (2.4.41)
82
+ remote: - nginx (1.16.1)
83
+ remote: -----> Installing dependencies...
84
+ remote: Composer version 1.9.0 2019-08-02 20:55:32
85
+ remote:
86
+ remote: ! WARNING: Composer vendor dir found in project!
87
+ remote: !
88
+ remote: ! Your Git repository contains Composer's 'vendor' directory.
89
+ remote: !
90
+ remote: ! This directory should not be under version control; only your
91
+ remote: ! 'composer.json' and 'composer.lock' files need to be added, as
92
+ remote: ! Composer will handle installation of dependencies on deploy.
93
+ remote: !
94
+ remote: ! To suppress this notice, first remove the folder from the index
95
+ remote: ! by running 'git rm -r --cached vendor/'.
96
+ remote: ! Next, edit your project's '.gitignore' file and add the folder
97
+ remote: ! '/vendor/' to the list, then commit the changes.
98
+ remote: !
99
+ remote: ! For more info, refer to the Composer FAQ: http://bit.ly/1rlCSZU
100
+ remote:
101
+ remote:
102
+ remote: ! ERROR: Package 'heroku/heroku-buildpack-php' found!
103
+ remote: !
104
+ remote: ! Your 'composer.json' requires 'heroku/heroku-buildpack-php' in
105
+ remote: ! the 'require' section. This package may only be used as a
106
+ remote: ! dependency in 'require-dev', because Heroku installs the latest
107
+ remote: ! version of the buildpack during builds.
108
+ remote: !
109
+ remote: ! Please perform the following steps locally on your computer to
110
+ remote: ! resolve this issue before attempting another deploy:
111
+ remote: ! 1) move the requirement for 'heroku/heroku-buildpack-php' from
112
+ remote: ! section 'require' to 'require-dev' in 'composer.json'
113
+ remote: ! 2) run 'composer update' to re-generate the lock file
114
+ remote: ! 3) stage changes using 'git add composer.json composer.lock'
115
+ remote: ! 4) commit changes using 'git commit'
116
+ remote: !
117
+ remote: ! REMINDER: the following warnings were emitted during the build;
118
+ remote: ! check the details above, as they may be related to this error:
119
+ remote: ! - Your 'composer.lock' is out of date!
120
+ remote: ! - Composer vendor dir found in project!
121
+ remote:
122
+ remote: ! Push rejected, failed to compile PHP app.
123
+ remote:
124
+ remote: ! Push failed
125
+ remote: Verifying deploy...
126
+ remote:
127
+ remote: ! Push rejected to custombbs.
128
+ ```
129
+
130
+ ```buildlog
131
+ -----> PHP app detected
132
+ -----> Bootstrapping...
133
+ ! WARNING: Your 'composer.lock' is out of date!
134
+ !
135
+ ! The 'composer.lock' file in your project is not up to date with
136
+ ! the main 'composer.json' file. This may result in installation
137
+ ! of incorrect packages or package versions.
138
+ !
139
+ ! The lock file is required in order to guarantee reliable and
140
+ ! reproducible installation of dependencies across systems and
141
+ ! deploys. It must always be kept in sync with 'composer.json'.
142
+ !
143
+ ! Whenever you change 'composer.json', ensure that you perform
144
+ ! the following steps locally on your computer:
145
+ ! 1) run 'composer update'
146
+ ! 2) add all changes using 'git add composer.json composer.lock'
147
+ ! 3) commit using 'git commit'
148
+ !
149
+ ! Ensure that you updated the lock file correctly, and that you
150
+ ! ran 'git add' on both files, before deploying again.
151
+ !
152
+ ! Please remember to always keep your 'composer.lock' updated in
153
+ ! lockstep with 'composer.json' to avoid common problems related
154
+ ! to dependencies during collaboration and deployment.
155
+ !
156
+ ! Please refer to the Composer documentation for further details:
157
+ ! https://getcomposer.org/doc/
158
+ ! https://getcomposer.org/doc/01-basic-usage.md
159
+ -----> Installing platform packages...
160
+ NOTICE: No runtime required in composer.lock; using PHP ^7.0.0
161
+ - php (7.3.11)
162
+ - apache (2.4.41)
163
+ - nginx (1.16.1)
164
+ -----> Installing dependencies...
165
+ Composer version 1.9.0 2019-08-02 20:55:32
166
+ ! WARNING: Composer vendor dir found in project!
167
+ !
168
+ ! Your Git repository contains Composer's 'vendor' directory.
169
+ !
170
+ ! This directory should not be under version control; only your
171
+ ! 'composer.json' and 'composer.lock' files need to be added, as
172
+ ! Composer will handle installation of dependencies on deploy.
173
+ !
174
+ ! To suppress this notice, first remove the folder from the index
175
+ ! by running 'git rm -r --cached vendor/'.
176
+ ! Next, edit your project's '.gitignore' file and add the folder
177
+ ! '/vendor/' to the list, then commit the changes.
178
+ !
179
+ ! For more info, refer to the Composer FAQ: http://bit.ly/1rlCSZU
180
+ ! ERROR: Package 'heroku/heroku-buildpack-php' found!
181
+ !
182
+ ! Your 'composer.json' requires 'heroku/heroku-buildpack-php' in
183
+ ! the 'require' section. This package may only be used as a
184
+ ! dependency in 'require-dev', because Heroku installs the latest
185
+ ! version of the buildpack during builds.
186
+ !
187
+ ! Please perform the following steps locally on your computer to
188
+ ! resolve this issue before attempting another deploy:
189
+ ! 1) move the requirement for 'heroku/heroku-buildpack-php' from
190
+ ! section 'require' to 'require-dev' in 'composer.json'
191
+ ! 2) run 'composer update' to re-generate the lock file
192
+ ! 3) stage changes using 'git add composer.json composer.lock'
193
+ ! 4) commit changes using 'git commit'
194
+ !
195
+ ! REMINDER: the following warnings were emitted during the build;
196
+ ! check the details above, as they may be related to this error:
197
+ ! - Your 'composer.lock' is out of date!
198
+ ! - Composer vendor dir found in project!
199
+ ! Push rejected, failed to compile PHP app.
200
+ ! Push failed
201
+ ```
202
+ 追加での質問で恐縮ですが、
203
+ 1.DOCUMENTROOTを読み込まれないエラーとComposer.jsonの設定は関係ありますか。
204
+ 2.Composer.jsonをインストールする際はプロジェクト内にvendorファイルを配置しないようにするものでしょうか。
205
+ (その場合、どこにvendorファイルを置くものでしょうか。)
206
+
207
+ 質問が多くなってしまい大変恐縮ですが、ご教授をお願いいたします。