appengine won't enable php-gd via php.ini or composer.json

743 views
Skip to first unread message

Eli Taylor

unread,
Jan 19, 2020, 1:33:31 PM1/19/20
to Google App Engine
I'm trying to deploy a Drupal 8 application where the project root includes the composer.json, app.yaml, and php.ini, while the web doc root is `/web`

`composer install` errors with "The requested PHP extension ext-gd * is missing from your system. Install or enable PHP's gd extension"
`gcloud app deloy` errors with "Your application does not satisfy all of the requirements for a runtime of type [php72]"


my app.yaml:
runtime: php72env: flexentrypoint: serve web/index.phpruntime_config: document_root: web front_controller_file: web/index.phpenv_variables: DB_DATABASE: xxx DB_USERNAME: xxx DB_PASSWORD: "xxx" DB_SOCKET: "/cloudsql/projectname:region:instancename"beta_settings: cloud_sql_instances: "projectname:region:instancename"handlers:- url: /sites/default/files
static_dir: /sites/default/files
- url: /(.+\.(gif|png|jpg))$ static_files: \1 upload: .+\.(gif|png|jpg)$

for composer i ran: 
composer require "ext-gd:*" --ignore-platform-reqs

my php.ini
output_buffering = "1"extension=gd.soextension=curl.soextension=imagick.so

Jad El Houssami

unread,
Jan 23, 2020, 1:37:58 PM1/23/20
to google-a...@googlegroups.com
Hello Eli,

For composer, are you including: composer require "ext-gd:*" --ignore-platform-reqs in your application’s composer.json? Otherwise it may only be installed locally and won’t be picked up by the App Engine Flexible environment.

Your title seems to suggest that you have already included it with composer.json, so I would additionally suggest using the app.yaml reference page to double check for any typos. For example in your app.yaml: changing “runtime: php72” to “runtime: php” instead.

Google Groups are generally reserved for discussions and opinions about Google products, you may want to refer to Stack Exchange for how-to and technical questions since the answer-question format on those sites will give your question greater visibility. On the other hand, if you deem this an issue with a product, I invite you to use our Issue Tracker to check whether there is an open issue for the problem, and to open a new issue if not. I hope that this helps point you in the right direction.

Eli Taylor

unread,
Jan 24, 2020, 8:48:02 AM1/24/20
to Google App Engine
I was requiring in my application and via the php.ini. Eitherway, i was finally able to get `composer install --ignore-platform-reqs`  to work. (ie. only with the --ignore-platform-reqs flag)
Reply all
Reply to author
Forward
0 new messages