質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.50%
Git

Gitはオープンソースの分散バージョン管理システム(DVCS)です。

Heroku

HerokuはHeroku社が開発と運営を行っているPaaSの名称です。RubyやNode.js、Python、そしてJVMベース(Java、Scala、Clojureなど)の複数のプログラミング言語をサポートしている。

PHP

PHPは、Webサイト構築に特化して開発されたプログラミング言語です。大きな特徴のひとつは、HTMLに直接プログラムを埋め込むことができるという点です。PHPを用いることで、HTMLを動的コンテンツとして出力できます。HTMLがそのままブラウザに表示されるのに対し、PHPプログラムはサーバ側で実行された結果がブラウザに表示されるため、PHPスクリプトは「サーバサイドスクリプト」と呼ばれています。

Q&A

解決済

1回答

1522閲覧

[PHP][Heroku]ブラウザ接続で、GD not installedと表示されてしまいます。

mango

総合スコア33

Git

Gitはオープンソースの分散バージョン管理システム(DVCS)です。

Heroku

HerokuはHeroku社が開発と運営を行っているPaaSの名称です。RubyやNode.js、Python、そしてJVMベース(Java、Scala、Clojureなど)の複数のプログラミング言語をサポートしている。

PHP

PHPは、Webサイト構築に特化して開発されたプログラミング言語です。大きな特徴のひとつは、HTMLに直接プログラムを埋め込むことができるという点です。PHPを用いることで、HTMLを動的コンテンツとして出力できます。HTMLがそのままブラウザに表示されるのに対し、PHPプログラムはサーバ側で実行された結果がブラウザに表示されるため、PHPスクリプトは「サーバサイドスクリプト」と呼ばれています。

0グッド

1クリップ

投稿2018/12/13 10:14

編集2018/12/13 12:44

#ブラウザを立ち上げようとすると GD not installed
現在、herokuでアプリをデプロイしようとしているのですが、heroku open でブラウザを開くと、GD not
installed と表示されてしまいます。
しかし、php -m | grep gdのコマンドを打つと、gdと出てきます。

terminal

1❯ php -m | grep gd [master] 2gd

調べても原因がわからないので、どのような原因が考えられうるか教えていただきたいです。

#やってみたこと
composer.jsonのrequireに"ext-mbstring": "*","ext-gd": "*"を追記

↓composer.json追記前

terminal

1❯ git push heroku master [master] 2Enumerating objects: 3, done. 3Counting objects: 100% (3/3), done. 4Delta compression using up to 4 threads 5Compressing objects: 100% (2/2), done. 6Writing objects: 100% (2/2), 222 bytes | 111.00 KiB/s, done. 7Total 2 (delta 1), reused 0 (delta 0) 8remote: Compressing source files... done. 9remote: Building source: 10remote: 11remote: -----> PHP app detected 12remote: -----> Bootstrapping... 13remote: -----> Installing platform packages... 14remote: - php (7.2.12) 15remote: - nginx (1.8.1) 16remote: - apache (2.4.37) 17remote: -----> Installing dependencies... 18remote: Composer version 1.7.2 2018-08-16 16:57:12 19remote: Loading composer repositories with package information 20remote: Installing dependencies from lock file 21remote: Nothing to install or update 22remote: Generating optimized autoload files 23remote: -----> Preparing runtime environment... 24remote: NOTICE: No Procfile, using 'web: heroku-php-apache2'. 25remote: -----> Checking for additional extensions to install... 26remote: -----> Discovering process types 27remote: Procfile declares types -> web 28remote: 29remote: -----> Compressing... 30remote: Done: 18.2M 31remote: -----> Launching... 32remote: Released v8 33remote: https://***.herokuapp.com/ deployed to Heroku 34remote: 35remote: Verifying deploy... done. 36To https://git.heroku.com/***.git 37 65611bc..5bb45bb master -> master

↓composer.json追記後

terminal

1❯ git push heroku master [master] 2Enumerating objects: 5, done. 3Counting objects: 100% (5/5), done. 4Delta compression using up to 4 threads 5Compressing objects: 100% (3/3), done. 6Writing objects: 100% (3/3), 331 bytes | 331.00 KiB/s, done. 7Total 3 (delta 1), reused 0 (delta 0) 8remote: Compressing source files... done. 9remote: Building source: 10remote: 11remote: -----> PHP app detected 12remote: -----> Bootstrapping... 13remote: 14remote: ! WARNING: Your 'composer.lock' is out of date! 15remote: ! 16remote: ! The 'composer.lock' file in your project is not up to date with 17remote: ! the main 'composer.json' file. This may result in installation 18remote: ! of incorrect packages or package versions. 19remote: ! 20remote: ! The lock file is required in order to guarantee reliable and 21remote: ! reproducible installation of dependencies across systems and 22remote: ! deploys. It must always be kept in sync with 'composer.json'. 23remote: ! 24remote: ! Whenever you change 'composer.json', ensure that you perform 25remote: ! the following steps locally on your computer: 26remote: ! 1) run 'composer update' 27remote: ! 2) add all changes using 'git add composer.json composer.lock' 28remote: ! 3) commit using 'git commit' 29remote: ! 30remote: ! Ensure that you updated the lock file correctly, and that you 31remote: ! ran 'git add' on both files, before deploying again. 32remote: ! 33remote: ! Please remember to always keep your 'composer.lock' updated in 34remote: ! lockstep with 'composer.json' to avoid common problems related 35remote: ! to dependencies during collaboration and deployment. 36remote: ! 37remote: ! Please refer to the Composer documentation for further details: 38remote: ! https://getcomposer.org/doc/ 39remote: ! https://getcomposer.org/doc/01-basic-usage.md 40remote: 41remote: -----> Installing platform packages... 42remote: - php (7.2.12) 43remote: - nginx (1.8.1) 44remote: - apache (2.4.37) 45remote: -----> Installing dependencies... 46remote: Composer version 1.7.2 2018-08-16 16:57:12 47remote: Loading composer repositories with package information 48remote: Installing dependencies from lock file 49remote: 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. 50remote: Nothing to install or update 51remote: Generating optimized autoload files 52remote: -----> Preparing runtime environment... 53remote: NOTICE: No Procfile, using 'web: heroku-php-apache2'. 54remote: -----> Checking for additional extensions to install... 55remote: -----> Discovering process types 56remote: Procfile declares types -> web 57remote: 58remote: -----> Compressing... 59remote: Done: 18.2M 60remote: -----> Launching... 61remote: Released v9 62remote: https://***.herokuapp.com/ deployed to Heroku 63remote: 64remote: Verifying deploy... done. 65To https://git.heroku.com/***.git 66 5bb45bb..aadf7d6 master -> master

#環境
Mac
php 7.1.19

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

自己解決

php@7.2をインストール後に、composer installで解決しました。

投稿2018/12/13 14:23

mango

総合スコア33

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.50%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問