Issue with run-laravel-on-appengine-flexible

114 views
Skip to first unread message

Ravi Shanker

unread,
Dec 24, 2017, 12:15:10 PM12/24/17
to Google App Engine

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/

                     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.

img_20171224.png

George (Cloud Platform Support)

unread,
Dec 25, 2017, 5:22:26 PM12/25/17
to Google App Engine

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

Takashi Matsuo

unread,
Jan 2, 2018, 4:47:54 PM1/2/18
to google-a...@googlegroups.com

Hi Ravi,

Did you enable the sqladmin API? The following link will let you do this.

On Mon, Dec 25, 2017 at 2:22 PM 'George (Cloud Platform Support)' via Google App Engine <google-a...@googlegroups.com> wrote:

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.


--
-- Takashi
Reply all
Reply to author
Forward
0 new messages