PHP modules for PHP applications do not work

I read the docs on the GAE modules. This sample application shows how to use modules in a GAE application. I changed the code a bit to use both php and python languages .

Here is the Github link where the corresponding code is located.

When I try to run this application on my local machine by running this command

dev_appserver.py dispatch.yaml app.yaml php.yaml static_backend.yaml --php_executable_path /usr/bin/php

everything works fine except for code written in php. When I try to access this part by invoking this localhost:8080/mobile/, I get a blank page instead Hello World.

0
source share
1 answer

.

php module python module

dev_appserver.py dispatch.yaml app.yaml php.yaml static_backend.yaml 
INFO     2016-08-03 04:19:01,413 devappserver2.py:769] Skipping SDK update check.
INFO     2016-08-03 04:19:01,517 api_server.py:205] Starting API server at: http://localhost:52017
INFO     2016-08-03 04:19:01,520 dispatcher.py:185] Starting dispatcher running at: http://localhost:8080
INFO     2016-08-03 04:19:01,526 dispatcher.py:197] Starting module "default" running at: http://localhost:8081
INFO     2016-08-03 04:19:01,718 dispatcher.py:197] Starting module "php-module" running at: http://localhost:8082
INFO     2016-08-03 04:19:01,734 dispatcher.py:197] Starting module "static-backend" running at: http://localhost:8083
INFO     2016-08-03 04:19:01,744 admin_server.py:116] Starting admin server at: http://localhost:8000
INFO     2016-08-03 04:19:02,209 module.py:1730] New instance for module "php-module" serving on:
http://localhost:8082

INFO     2016-08-03 04:19:02,759 module.py:1730] New instance for module "static-backend" serving on:
http://localhost:8083

INFO     2016-08-03 04:19:03,283 module.py:788] php-module: "GET /_ah/start HTTP/1.1" 200 24
INFO     2016-08-03 04:19:03,470 module.py:788] static-backend: "GET /_ah/start HTTP/1.1" 200 3108
INFO     2016-08-03 04:19:15,683 module.py:788] static-backend: "GET /mobile/ HTTP/1.1" 200 3752
INFO     2016-08-03 04:19:16,407 module.py:788] static-backend: "GET /favicon.ico HTTP/1.1" 200 3626
INFO     2016-08-03 04:19:18,914 module.py:788] static-backend: "GET /mobile HTTP/1.1" 200 3710
INFO     2016-08-03 04:19:19,345 module.py:788] static-backend: "GET /favicon.ico HTTP/1.1" 200 3650
INFO     2016-08-03 04:19:21,096 module.py:788] static-backend: "GET / HTTP/1.1" 200 3648

:

  • PHP- gcloud components install app-engine-php
  • --php-executable-flag
  • , which php --php-executable-flag php-cgi
+1

Source: https://habr.com/ru/post/1525503/


All Articles