2

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

enter image description here

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

Community
  • 1
  • 1
silverFoxA
  • 4,549
  • 7
  • 33
  • 73
  • It's still possible to read parts of the text that you blacked out. You might want to delete the picture. – Joachim Jul 18 '17 at 13:03

2 Answers2

1

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.

Dan Cornilescu
  • 39,470
  • 12
  • 57
  • 97
  • Their only guide on running flex locally? This sentence? "To test your application's functionality before deploying, run your application in your local environment with the development tools that you usually use." – good_afternoon May 31 '18 at 17:36
-1

I encountered the same error with some config settings I used.

my app.yaml file worked with php runtime:

runtime: php
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: your_key
  STORAGE_DIR: /tmp

I couldn't get the standard environment to work with php, if anyone can, show us how :)