Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Can I download the GAE runtime images?

We just run into a issue caused by differences between our GAE staging environment and our local one, based on Docker Compose.

The PHP 7.4 GAE runtime throws a critical error in a line that is only a notice for the local PHP 7.4 container. I'm guessing the issue has to do with different configuration but I have looked at the error reporting setting and even though they don't have the same values, it doesn't explain the problem.

Are the runtimes Docker images available to download, or can I easily convert whatever they are to something Docker understands? That way I could be using that environment locally too and avoid this kind of issue in the future.

Thank you!

1 3 162
3 REPLIES 3

Hi @Aruku64-QPV,

Welcome to Google Cloud Community!

We don't have a way to download GAE runtime images as Google Cloud depends on the environment available online, in your case PHP 7.4, would be the same as the one that is provided by the PHP development team.

Please share the specific error message and/or sample code and configuration including your app.yaml file. Based on this documentation on creating app for PHP 7.4 or later, you must update your app.yaml file. Your app.yaml should include runtime_config and operating_system settings:

  runtime: php
 
env: flex

 
runtime_config:
      operating_system: "ubuntu22"
     
document_root: .

Please check this documentation on PHP runtime for new versions for more information.

Additionally, you could build a custom runtime if you have alternative implementation of your App Engine flex environment.

Hope this helps.

Hi @robertcarlos, thank you for your help.

I don't have those settings in the app.yaml file, because I'm not using the flexible but the standard environment.

The error message is:

PHP Notice: TypeError: Return value of App\ApiClients\AzureApiClient::getDailyGlobalKpip() must be of the type array, null returned

As you can see, this is a notice that locally doesn't terminate the process.

This is the corresponding configuration (grep by error) :

local env

display_errors => STDOUT => STDOUT
display_startup_errors => On => On
error_append_string => no value => no value
error_log => no value => no value
error_prepend_string => no value => no value
error_reporting => 32767 => 32767
html_errors => Off => Off
ignore_repeated_errors => Off => Off
log_errors => On => On
log_errors_max_len => 1024 => 1024
track_errors => Off => Off
xmlrpc_error_number => 0 => 0
xmlrpc_errors => Off => Off
intl.error_level => 0 => 0
xdebug.force_display_errors => Off => Off
xdebug.force_error_reporting => 0 => 0
xdebug.show_error_trace => Off => Off
xdebug.start_upon_error => default => default
opcache.error_log => no value => no value

GAE instance

display_errors => Off => Off
display_startup_errors => Off => Off
error_append_string => no value => no value
error_log => no value => no value
error_prepend_string => no value => no value
error_reporting => 22527 => 22527
html_errors => Off => Off
ignore_repeated_errors => Off => Off
log_errors => On => On
log_errors_max_len => 0 => 0
track_errors => Off => Off
xmlrpc_error_number => 0 => 0
xmlrpc_errors => Off => Off
intl.error_level => 0 => 0
opcache.error_log => no value => no value

Thank you again.

Hi @Aruku64-QPV,

If you're using standard, your app.yaml should look similar like this:

runtime: php82 #or in your case php74 since you're using php 7.4

handlers: #values below are just examples and may differ from your app settings
# Serve a directory as a static resource.
- url: /stylesheets
 
static_dir: stylesheets


# Serve images as static resources.
- url: /(.+\.(gif|png|jpg))$
 
static_files: \1
 
upload: .+\.(gif|png|jpg)$

# Serve your app through a front controller at index.php or public/index.php.
- url: .*
 
script: auto

You should check this documentation on App Engine app.yaml reference for PHP for your reference. You should also check your source code as there may be values that were incorrectly declared or undeclared.

Also, make sure that your gcloud CLI is updated by running gcloud components update command to update to the latest release. 

Finally, you may file this as a bug so that our engineers could take a look at this. We don't have a specific ETA for this but you can keep track of its progress once the ticket has been created.