お世話になっております。
下記の現象で知見がある方がいらっしゃいましたらご教示お願いします。
###起きたこと
PHPアプリをherokuデプロイ時『Internal Server Error』エラーが起きました。
・エラー発生までの手順
herokuログイン
⇓
herokuにアプリを作成
⇓
アプリをpush
⇓
heroku open
⇓
『Internal Server Error』エラー
###確認したこと
heroku logs -t
でログを確認。
2021-02-06T05:18:52.250168+00:00 heroku[router]: at=info method=GET path="/user_login/user_top.php" host=karirin3948.herokuapp.com request_id=53828f43-15d9-4f6c-a082-0eb82b373388 fwd="103.5.140.158" dyno=web.1 connect=0ms service=3ms status=500 bytes=704 protocol=https 2021-02-06T05:18:52.250691+00:00 app[web.1]: [Sat Feb 06 05:18:52.249477 2021] [core:alert] [pid 156:tid 139699968517888] [client 10.81.170.215:26094] /app/user_login/.htaccess: Invalid command 'php_value', perhaps misspelled or defined by a module not included in the server configuration 2021-02-06T05:18:52.251524+00:00 app[web.1]: 10.81.170.215 - - [06/Feb/2021:05:18:52 +0000] "GET /user_login/user_top.php HTTP/1.1" 500 528 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36 Edg/88.0.705.56 2021-02-06T05:28:50.736265+00:00 heroku[router]: at=info method=GET path="/user_login/user_top.php" host=karirin3948.herokuapp.com request_id=1fc743d4-ed8d-4b2d-b4e9-daf87d32ad8b fwd="103.5.140.158" dyno=web.1 connect=0ms service=5ms status=500 bytes=704 protocol=https 2021-02-06T05:28:50.738506+00:00 app[web.1]: [Sat Feb 06 05:28:50.737484 2021] [core:alert] [pid 155:tid 139700147922688] [client 10.5.225.117:18343] /app/user_login/.htaccess: Invalid command 'php_value', perhaps misspelled or defined by a module not included in the server configuration 2021-02-06T05:28:50.739085+00:00 app[web.1]: 10.5.225.117 - - [06/Feb/2021:05:28:50 +0000] "GET /user_login/user_top.php HTTP/1.1" 500 528 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36 Edg/88.0.705.56 2021-02-06T05:44:39.270473+00:00 app[web.1]: [Sat Feb 06 05:44:39.269497 2021] [autoindex:error] [pid 156:tid 139700018861824] [client 10.5.212.115:26408] AH01276: Cannot serve directory /app/: No matching DirectoryIndex (index.php,index.html,index.htm) found, and server-generated directory index forbidden by Options directive 2021-02-06T05:44:39.271161+00:00 app[web.1]: 10.5.212.115 - - [06/Feb/2021:05:44:39 +0000] "GET / HTTP/1.1" 403 199 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36 Edg/88.0.705.63 2021-02-06T05:44:39.271852+00:00 heroku[router]: at=info method=GET path="/" host=karirin3948.herokuapp.com request_id=f7f2be6d-34ad-4cd6-88d9-995074a971eb fwd="103.5.140.143" dyno=web.1 connect=1ms service=1ms status=403 bytes=363 protocol=https 2021-02-06T05:44:39.536736+00:00 app[web.1]: 10.5.212.115 - - [06/Feb/2021:05:44:39 +0000] "GET /favicon.ico HTTP/1.1" 404 196 "https://karirin3948.herokuapp.com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36 Edg/88.0.705.63 2021-02-06T05:44:39.544368+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=karirin3948.herokuapp.com request_id=48558be0-a58b-4b6b-816f-d987f0ebe081 fwd="103.5.140.143" dyno=web.1 connect=1ms service=4ms status=404 bytes=360 protocol=https 2021-02-06T05:44:53.876076+00:00 app[web.1]: [Sat Feb 06 05:44:53.875210 2021] [core:alert] [pid 156:tid 139699733579520] [client 10.5.212.115:10955] /app/user_login/.htaccess: Invalid command 'php_value', perhaps misspelled or defined by a module not included in the server configuration 2021-02-06T05:44:53.877621+00:00 app[web.1]: 10.5.212.115 - - [06/Feb/2021:05:44:53 +0000] "GET /user_login/user_top.php HTTP/1.1" 500 528 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36 Edg/88.0.705.63 2021-02-06T05:44:53.877627+00:00 heroku[router]: at=info method=GET path="/user_login/user_top.php" host=karirin3948.herokuapp.com request_id=059c058e-2939-4c9e-9a0d-be2dd911345c fwd="103.5.140.143" dyno=web.1 connect=1ms service=5ms status=500 bytes=704 protocol=https 2021-02-06T05:45:59.522387+00:00 app[web.1]: [Sat Feb 06 05:45:59.521434 2021] [core:alert] [pid 155:tid 139699985299200] [client 10.47.227.158:21225] /app/user_login/.htaccess: Invalid command 'php_value', perhaps misspelled or defined by a module not included in the server configuration 2021-02-06T05:45:59.523780+00:00 app[web.1]: 10.47.227.158 - - [06/Feb/2021:05:45:59 +0000] "GET /user_login/user_top.php HTTP/1.1" 500 528 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.146 Safari/537.36 2021-02-06T05:45:59.523047+00:00 heroku[router]: at=info method=GET path="/user_login/user_top.php" host=karirin3948.herokuapp.com request_id=7d2cefed-5caa-4c22-b44d-21d214203313 fwd="103.5.140.143" dyno=web.1 connect=1ms service=2ms status=500 bytes=704 protocol=https 2021-02-06T05:45:59.874479+00:00 app[web.1]: 10.47.227.158 - - [06/Feb/2021:05:45:59 +0000] "GET /favicon.ico HTTP/1.1" 404 196 "https://karirin3948.herokuapp.com/user_login/user_top.php" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.146 Safari/537.36 2021-02-06T05:45:59.874975+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=karirin3948.herokuapp.com request_id=983f4a23-4604-440d-a0e2-26cc089052aa fwd="103.5.140.143" dyno=web.1 connect=1ms service=5ms status=404 bytes=360 protocol=https
user_login/.htaccess
でInvalid command 'php_value'~
が起きていることを確認。
#user_login/.htaccess (修正前) php_value output_buffering ON php_value default_charset UTF-8 php_value mbstring.detect_order SJIS,EUC-JP,JIS,UTF-8,ASCII php_value mbstring.http_input pass php_value mbstring.http_output pass php_value mbstring.internal_encoding UTF-8 php_value mbstring.substitute_character none php_value mbstring.encoding_translation OFF ⇓ (修正後) SetEnv php_value output_buffering ON^Mdefault_charset UTF-8^Mmbstring.detect_order SJIS,EUC-JP,JIS,UTF-8,ASCII^Mmbstring.http_input pass^Mmbstring.http_output pass^Mmbstring.internal_encoding UTF-8^Mmbstring.substitute_character none^Mmbstring.encoding_translation OFF
下記サイトを参考にuser_login/.htaccess
を修正したが、結果は変わらず。
https://mattintosh.hatenablog.com/entry/20200605/1591359561
■github
https://github.com/karirin/app
回答1件
あなたの回答
tips
プレビュー