I have followed this tutorial and created a database under the name zoho_portal
. My app.yaml
contents are:
runtime: php
env: flex
runtime_config:
document_root: public
# required on some platforms so ".env" is not skipped
skip_files: false
env_variables:
# The values here will override those in ".env". This is useful for
# production-specific configuration. However, feel free to set these
# values in ".env" instead if you prefer.
APP_LOG: errorlog
STORAGE_DIR: /tmp
CACHE_DRIVER: database
SESSION_DRIVER: database
## Set these environment variables according to your CloudSQL configuration.
DB_HOST: localhost
DB_DATABASE: zoho_portal
DB_USERNAME: USER
DB_PASSWORD: PASS
DB_SOCKET: /cloudsql/zoho-portal-159018:us-central1:zoho-portal
beta_settings:
cloud_sql_instances: "zoho-portal-159018:us-central1:zoho-portal"
I have also added this to my composer.json
:
"post-deploy-cmd": [
"chmod -R 755 bootstrap\/cache"
]
However, after deploying this using gcloud app deploy
, and visiting the website at: https://zoho-portal-159018.appspot.com/, I receive this error:
SQLSTATE[HY000] [2002] No such file or directory (SQL: select * from
sessions
whereid
= iq8isoeEqTaj5xVNmVm0JuFKtR8vtSEB0ajJl23o limit 1)
As far as I can see, I haven't missed any step listed in the tutorial and the database is set up correctly. Could this have something to do with database migration?