![](/img/trans.png)
[英]How to run Laravel migrations on Google App Engine Standard after Deployment
[英]Laravel deployment using Google App Engine: No such file or directory
我已按照本教程进行操作,并以zoho_portal
的名称创建了一个数据库。 我的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
并访问以下网站后: https : gcloud app deploy
,我收到此错误:
SQLSTATE [HY000] [2002]没有这样的文件或目录(SQL:从
id
为iq8isoeEqTaj5xVNmVm0JuFKtR8vtSEB0ajJl23o限制为1的sessions
中选择*)
据我所知,我没有错过本教程中列出的任何步骤,并且数据库已正确设置。 我也认为这与数据库迁移无关。 据我所知,这与套接字文件的设置有关。
问题在于使用数据库作为会话驱动程序。 临时解决方案是使用其他驱动程序(memcached,redis)等
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.