Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.md

009-FastCGIWeb

Minimal multi-request fixture for phpc deploy + future FastCGI adapter (#173). Tracks #2331.

Route Response
GET /example.php (empty PATH_INFO) ok (health)
GET /example.php/... (non-empty PATH_INFO) Plain-text REQUEST_URI, SCRIPT_NAME, PATH_INFO

Scaffold

./phpc init --profile fastcgiweb /tmp/my-fastcgiweb
./phpc lint /tmp/my-fastcgiweb/example.php

Template parity: ./script/check-init-fastcgiweb-parity.sh (#2342).

Run (VM / serve)

./phpc lint examples/009-FastCGIWeb/example.php
./phpc run examples/009-FastCGIWeb/example.php
./phpc serve 127.0.0.1:8080 examples/009-FastCGIWeb
curl -s http://127.0.0.1:8080/example.php
curl -s http://127.0.0.1:8080/example.php/ping

FastCGI worker (production-style)

Long-lived TCP listener (adapter #173, CLI #2427):

./phpc fcgi --help
./phpc fcgi --project examples/009-FastCGIWeb
# optional AOT after build:
./phpc build --project examples/009-FastCGIWeb
./phpc fcgi --project examples/009-FastCGIWeb

Point nginx fastcgi_pass at 127.0.0.1:9000 (or your --listen address). Deploy bundle notes: docs/deploy-production.md (#445).

AOT + deploy

cd examples/009-FastCGIWeb
../../phpc build --project .
QUERY_STRING= REQUEST_URI=/example.php SCRIPT_NAME=/example.php ./.phpc/bin/app
../../phpc deploy --project . /tmp/fastcgiweb-dist

Production nginx + PHPC_DEPLOY_ROOT: docs/deploy-production.md (#445). Long-lived FastCGI loop: #173.

Status

Layer Notes
VM phpc run ✅ health ok
VM phpc serve ✅ health + /ping diagnostics
AOT phpc build --project ✅ when LLVM ready (ExamplesCompileTest)
AOT CGI execute ✅ default-on FASTCGI_WEB_AOT_SMOKE_GATE=1 (#2352, #2369); EXAMPLES_AOT_SMOKE_ONLY=009 ./script/examples-aot-smoke.sh
Deploy CGI smoke ✅ opt-in FASTCGI_WEB_DEPLOY_SMOKE_GATE=1 (#2359); make examples-fastcgiweb-deploy-smoke
FastCGI adapter execute phpc fcgi --project . (#173, #2427); FASTCGI_SMOKE_GATE=1 for PHPUnit
CI serve smoke ✅ default-on FASTCGI_WEB_SMOKE_GATE=1 (#2351, #2369); make examples-fastcgiweb-smoke

Related