Google cloud dev_appserver.py无法在本地托管laravel项目 [英] Google cloud dev_appserver.py unable to host laravel project locally

查看:255
本文介绍了Google cloud dev_appserver.py无法在本地托管laravel项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在运行Laravel 5.4项目,并托管在谷歌云计划下。为了测试相同的结果,我使用了 dev_appserver.py app.yaml --runtime = php55 它启动了程序,但它抛出了显示的错误。
/ b $ b

 警告:require(/ Users / Avi / Documents /.../ website / PLACEHOLDER):无法打开流:/ Users中没有这样的文件或目录/Avi/Downloads/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/php/setup.php on line 147 

致命错误:require():Failed opening required' /Users/Avi/Documents/.../website/PLACEHOLDER'(include_path ='。:/ Users / Avi / Documents /.../ website:/ Users / Avi / Downloads / google-cloud-sdk / platform / google_appengine / php / sdk')位于/Users/Avi/Downloads/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/php/setup.php on line 147



< h1> App.yaml

  runtime:custom 
env:flex

runtime_config:
document_root:public

#确保我们跳过仅用于本地开发的.env
skip_files:
- .env

env_variables:
#把生产环境变量放在这里。
APP_LOG:errorlog
APP_KEY:base64:...
STORAGE_DIR:/ tmp
CACHE_DRIVER:文件
SESSION_DRIVER:文件

我无法弄清楚什么是PLAEHOLDER以及如何解决错误,以便可以在本地为开发阶段托管以下laravel项目。



TIA

解决方案

您正在尝试使用本地测试从标准环境到您的灵活环境应用程序的方法论。本地devserver不支持灵活的应用程序 - 因此出现错误。



PHP Development Server

注意:dev_appserver.py 不会在App Engine灵活环境中运行。


相关:如何判断Google App Engine文档页面适用于标准或灵活的环境



这是您需要遵循的文档:在本地运行


I'm running Laravel 5.4 project, and hosted under google cloud project. In order to test the same I have used dev_appserver.py app.yaml --runtime=php55 it initiates the program but it throws the error displayed

Warning: require(/Users/Avi/Documents/.../website/PLACEHOLDER): failed to open stream: No such file or directory in /Users/Avi/Downloads/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/php/setup.php on line 147

Fatal error: require(): Failed opening required '/Users/Avi/Documents/.../website/PLACEHOLDER' (include_path='.:/Users/Avi/Documents/.../website:/Users/Avi/Downloads/google-cloud-sdk/platform/google_appengine/php/sdk') in /Users/Avi/Downloads/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/php/setup.php on line 147

App.yaml

  runtime: custom
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:...
  STORAGE_DIR: /tmp
  CACHE_DRIVER: file
  SESSION_DRIVER: file

I'm not able to figure out what's "PLAEHOLDER" and how to resolve the error so that the following laravel project can be hosted locally for development phase.

TIA

解决方案

You are trying to use the local testing methodology from the standard environment to your flexible environment app. The local devserver doesn't support flexible apps - hence the error.

From The PHP Development Server:

Note: dev_appserver.py does not run in the App Engine flexible environment.

Related: How to tell if a Google App Engine documentation page applies to the standard or the flexible environment

This is the doc you need to follow: Running locally.

这篇关于Google cloud dev_appserver.py无法在本地托管laravel项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆