Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

birdietorerik's avatar

Upload my project to google cloud

Hi!

Have created a laravel project that i want to upload to google cloud

Have this app.yaml file

runtime: php  # language of the app
 env: flex     # let app engine know we use flexible environment
 runtime_config:
    document_root: public   #folder where index.php is
# Ensure we skip ".env", which is only for local development
 skip_files:
  .env #we want to skip this to make sure we don’t mess stuff up on the server
 env_variables:
 # Put production environment variables here.
  APP_KEY: base64:/S5g90mh0HFDhVTw2dBwTvgKZAYLJOpOqtYAG9Tgl+M= 
  APP_LOG: errorlog
  STORAGE_DIR: /tmp

I am using gcloud

gcloud app deploy

But this gives me this error ?

Step #0: 
Step #0: In Parser.php line 449:
Step #0:                                                                             
Step #0:   Unable to parse at line 1 (near " runtime: php  # language of the app").  
Step #0:                                                                             
Step #0: 
Step #0: create [--php73-image PHP73-IMAGE] [--php72-image PHP72-IMAGE] [--php71-image PHP71-IMAGE] [--php70-image PHP70-IMAGE] [--php56-image PHP56-IMAGE] [-w|--workspace WORKSPACE]
Step #0: 
Finished Step #0
ERROR
ERROR: build step 0 "gcr.io/gcp-runtimes/php/gen-dockerfile@sha256:a2b75eea528a256e6a9c96a8a4fba26f44982298dc4951ac1eecc5b1ac07f0f0" failed: step exited with non-zero status: 1
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
ERROR: (gcloud.app.deploy) Cloud build failed. Check logs at https://console.cloud.google.com/cloud-build/builds/4db8d5db-5510-4911-8467-d1e3950ba75a?project=195780308742 Failure status: UNKNOWN: Error Response: [2] Build failed; check build logs for details

What is the issue here ???

0 likes
4 replies
birdietorerik's avatar

@tykus Hi!

There it say:

There was an error while loading /cloud-build/builds/4db8d5db-5510-4911-8467-d1e3950ba75a?project=195780308742

You are missing the following required permissions:
Project  195780308742
cloudbuild.builds.get
Check that the project ID is valid and you have permissions to access it. Learn more

Send feedback

Please or to participate in this conversation.