Php 使用Google App Engine的Laravel部署:没有这样的文件或目录
我按照教程的要求创建了一个名为“zoho_门户”的数据库。我的Php 使用Google App Engine的Laravel部署:没有这样的文件或目录,php,google-app-engine,Php,Google App Engine,我按照教程的要求创建了一个名为“zoho_门户”的数据库。我的app.yaml内容包括: 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 "
app.yaml
内容包括:
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"
我还将此添加到了我的composer.json
:
"post-deploy-cmd": [
"chmod -R 755 bootstrap\/cache"
]
但是,使用gcloud app deploy
部署此应用程序并访问以下网站后,我收到以下错误:
SQLSTATE[HY000][2002]没有这样的文件或目录(SQL:select*from
会话
其中id
=IQ8ISOEQTAJ5xVNMVM0JUFKTR8VTSEB0AJJL23O限制
(一)
就我所见,我没有错过教程中列出的任何步骤,数据库设置正确。我也不认为这与数据库迁移有任何关系。据我所知,这是如何设置套接字文件的问题。问题在于使用数据库作为会话驱动程序。暂时的解决办法是使用另一个驱动程序(memcached、redis)等我正在努力解决这个问题,我刚刚发布了这个。希望那里的人能给出解决方案。你能演示一下如何使用不同的驱动程序吗?请转到config->session.php的第['driver'=>]行粘贴'driver'=>env('session\u driver','file'),