PHP Google App Engine无法打开

我在本地运行Google App Engine,并在今天上午之前开始正常工作。 我创建了一个dir和一个文件,然后尝试启动该应用程序并得到下面的错误。 删除目录和文件不起作用。 我尝试了一个gcloud components update ,它更新了我的本地SDK,但仍然出现错误。

错误:root:php失败(255)with:stdout:X-Powered-By:PHP / 5.5.26 Content-type:text / html

警告:CHDIR():无效的参数(错误22)/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/devappserver2/php/setup.php上第70行

警告:要求(/用户/爸爸/ WebstormProjects /旧的PHP开发/新/ _ah /启动):未能打开流:在/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default没有这样的文件或目录。在线147上的Bundle / Contents / Resources / google_appengine / google / appengine / tools / devappserver2 / php / setup.php

致命错误:需要():所需失败开口 '/用户/爸爸/ WebstormProjects /旧的PHP-dev的/新的/ _ah /开始'(include_path中=”:/用户/爸爸/ WebstormProjects /旧的PHP-dev的/新:/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/php/sdk')在/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources第147行的/google_appengine/google/appengine/tools/devappserver2/php/setup.php

INFO 2016-09-28 13:38:15,042 module.py:788]默认:“GET / _ah / start HTTP / 1.1”500 1163

编辑

的app.yaml

application: old-php-dev
version: 1
runtime: php55
api_version: 1
threadsafe: yes
instance_class: B1
manual_scaling:
  instances: 1

beta_settings:
     cloud_sql_instances: "old-php-dev:us-central1:old-php-prod"

handlers:
- url: /(.*.(htm$|html$|css$|js$|pdf$))
  static_files: 1

  upload: (.*.(htm$|html$|css$|js$|pdf$))
  application_readable: true

- url: /(.*.(ico$|jpg$|png$|gif$|woff$|ttf$))
  static_files: 1

  upload: (.*.(ico$|jpg$|png$|gif$|woff$|ttf$))
  application_readable: true

- url: /member/(.+)
  script: member/1

- url: /member/.*
  script: member/index.php

- url: /(.+)
  script: 1

- url: /.*
  script: index.php 

重做这个:

- url: /(.+)
  script: 1

它正在拦截你对/_ah/start呼叫

也许最简单的方法是在app.yaml中添加一个处理器:

- url: /_ah/.*
  script: index.php 

并且添加一个简单的函数来在请求转到该起始url时返回一个空字符串。

链接地址: http://www.djcxy.com/p/88701.html

上一篇: PHP Google App Engine can't open

下一篇: Where is BaseModel in AppEngine for Django 1.2?