I have followed this
<https://cloud.google.com/community/tutorials/run-laravel-on-appengine-flexible>
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 where id = iq8isoeEqTaj5xVNmVm0JuFKtR8vtSEB0ajJl23o limit 1)
As far as I can see, I haven't missed any of the steps listed in the
tutorial and the database is set up correctly. I also don't think it has
anything to do with database migration. From what I can tell, this is an
issue with how the socket file is set up.
I already asked this question twice on Stack Overflow
<https://stackoverflow.com/questions/44381082/laravel-deployment-using-google-app-engine-no-such-file-or-directory>
and Server Fault
<https://serverfault.com/questions/852825/laravel-deployment-using-google-app-engine-no-such-file-or-directory>,
but received no proper response. I would high appreciate if someone would
help me resolve this issue, as I have been stuck at this stage for a few
weeks.
Thank you.
--
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit
https://groups.google.com/d/msgid/google-appengine/7ca6dad1-043a-4cf0-b2d8-79bda61b5526%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.