Hello,
I have deployed application on gcloud App Engine, I deployed successfully but getting SQLSTATE[HY000] [2002] No such file or directory while it working fine on local system.
I am following https://cloud.google.com/community/tutorials/run-laravel-on-appengine-flexible this tutorial.
I also followed https://www.youtube.com/watch?v=QhQ1PrYH3q0&t=230s but getting same issue.
Webstie url : https://phpsipl1.appspot.com/
My app.yml file is:
runtime: php
env: flex
runtime_config:
document_root: public
# Ensure we skip ".env", which is only for local development
skip_files:
- .env
env_variables:
# Put production environment variables here.
APP_LOG: errorlog
APP_KEY: base64:DZaQGd2hg/irj0YeTQtZxb3bY6Em25gMlLmoY8oDK7E=
STORAGE_DIR: /tmp
CACHE_DRIVER: database
SESSION_DRIVER: database
DB_HOST: localhost
DB_DATABASE: blog
DB_USERNAME: root
DB_PASSWORD: target@2017
DB_SOCKET: "/cloudsql/phpsipl1:us-central1:phpsipl"
beta_settings:
cloud_sql_instances: "phpsipl1:us-central1:phpsipl"
Please help me.
In App Engine, the local file system that your application is deployed to is not writeable. This behavior ensures the security and scalability of your application.
However, if the application needs to write and read files at runtime, App Engine provides a built-in Google Cloud Storage stream wrapper that allows you to use many of the standard PHP filesystem functions to read and write files in an App Engine PHP app. You may read more detail on the "Reading and Writing Files" page.
In App Engine, the local file system that your application is deployed to is not writeable. This behavior ensures the security and scalability of your application.
However, if the application needs to write and read files at runtime, App Engine provides a built-in Google Cloud Storage stream wrapper that allows you to use many of the standard PHP filesystem functions to read and write files in an App Engine PHP app. You may read more detail on the "Reading and Writing Files" page.
--
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 google-appengi...@googlegroups.com.
To post to this group, send email to google-a...@googlegroups.com.
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/4b1c4d8a-fc00-4189-b8d4-4ac076ad032c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.