herokuにてphpファイルを実行したところmb_substrあたりでうまくいかず調べるとherokuではmbstringをcomposer.jsonで記述する必要があると知りcomposer.jsonを作りcomposer installを行いました。
そこまではうまく行ったのですが、git push heroku masterをするとerrorが出てしまいます。
herokuにpushした時のerrorが以下です。
Counting objects: 2427, done. Delta compression using up to 4 threads. Compressing objects: 100% (2315/2315), done. Writing objects: 100% (2427/2427), 1.91 MiB | 367.00 KiB/s, done. Total 2427 (delta 675), reused 0 (delta 0) remote: Compressing source files... done. remote: Building source: remote: remote: -----> PHP app detected remote: -----> Bootstrapping... remote: -----> Installing platform packages... remote: - php (7.1.3) remote: - ext-mbstring (bundled with php) remote: - apache (2.4.20) remote: - nginx (1.8.1) remote: -----> Installing dependencies... remote: NOTICE: Using '/composer.phar' to install dependencies. remote: Composer version 1.4.2 2017-05-17 08:17:52 remote: remote: ! WARNING: Your Composer vendor dir is part of your Git repository. remote: This directory should not be under version control; only your remote: 'composer.json' and 'composer.lock' files should be added, which remote: will let Composer handle installation of dependencies on deploy. remote: To suppress this notice, first remove the folder from your index remote: by running 'git rm -r --cached vendor/'. remote: Next, edit your project's '.gitignore' file and add the folder remote: '/vendor/' to the list. remote: For more info, refer to the Composer FAQ: http://bit.ly/1rlCSZU remote: remote: Loading composer repositories with package information remote: Installing dependencies from lock file remote: Package operations: 0 installs, 0 updates, 1 removal remote: - Removing heroku/heroku-buildpack-php (v121) remote: Generating optimized autoload files remote: -----> Preparing runtime environment... remote: NOTICE: No Procfile, using 'web: heroku-php-apache2'. remote: -----> Checking for additional extensions to install... remote: -----> PHP app detected remote: ln: failed to create symbolic link '/app/.heroku/php/php': File exists remote: ! Push rejected, failed to compile PHP app. remote: remote: ! Push failed remote: Verifying deploy... remote: remote: ! Push rejected to kifu-getter. remote: To https://git.heroku.com/kifu-getter.git ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to 'https://git.heroku.com/kifu-getter.git'
またcomposer.jsonは以下のようにしております。
json
1{ 2 "require" : { 3 "php": ">=5.6.0", 4 "ext-mbstring": "*", 5 "silex/silex": "~1.3", 6 "monolog/monolog": "~1.7", 7 "twig/twig": "^1.19", 8 "symfony/twig-bridge": "^2.7" 9 }, 10 "require-dev": { 11 "heroku/heroku-buildpack-php": "*" 12 } 13} 14
わかるかた、心当たりある方、是非ともご教授よろしくお願いいたします。
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
退会済みユーザー
2017/07/12 07:12
2017/07/12 07:22
退会済みユーザー
2017/07/12 07:39
退会済みユーザー
2017/07/12 07:39
2017/07/12 08:31
退会済みユーザー
2017/07/12 23:08
2017/07/12 23:50 編集
退会済みユーザー
2017/07/13 00:18
2017/07/13 00:22