Stinky Stinky - 1 year ago 112
PHP Question

PHP Goole App Engine can't open _ah/start locally

I'm running Google App Engine locally with a PHP app, which started fine before this morning. I created a dir and a file, then tried to start the app and got the below error. Deleting the dir and file doesn't help. I tried an

gcloud components update
, which updated my local SDK, but I still get the error.

ERROR:root:php failure (255) with:
X-Powered-By: PHP/5.5.26
Content-type: text/html

Warning: chdir(): Invalid argument (errno 22) in /Applications/ on line 70

Warning: require(/Users/daddy/WebstormProjects/old-php-dev/new/_ah/start): failed to open stream: No such file or directory in /Applications/ on line 147

Fatal error: require(): Failed opening required '/Users/daddy/WebstormProjects/old-php-dev/new/_ah/start' (include_path='.:/Users/daddy/WebstormProjects/old-php-dev/new:/Applications/') in /Applications/ on line 147

INFO 2016-09-28 13:38:15,042] default: "GET /_ah/start HTTP/1.1" 500 1163



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

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

- 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

Answer Source

Rework this:

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

It is intercepting your call to /_ah/start

Perhaps the simplest way is to add a handler ABOVE it in app.yaml:

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

And add a simple function to return an empty string when a request goes to that start url.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download