The modern PHP app server https://frankenphp.dev/

Kévin Dunglas 4332bbe97c fix: don't flush if the request body hasn't been read entirely (#122) 2 years ago
.github 15815afbb4 ci: run tests with the race detector (#80) 2 years ago
C-Thread-Pool 229b4d6786 chore: switch back to upstream C-Thread-Pool lib (#119) 2 years ago
caddy 6a6dda5ed9 feat: expose PHP version (#102) 2 years ago
docs 266d126aac Updated docs for docker-compose configuration (#115) 2 years ago
internal d61c96a4c3 feat: use Zap for logging 2 years ago
testdata 878a30d92f fix: ensure there is always a free thread for non-worker scripts (#105) 2 years ago
.dockerignore acc48830f7 feat: improve Dockerfile and add some docs (#15) 2 years ago
.gitignore 13fb0beae9 fix: remove some more memory leaks in worker mode (#65) 2 years ago
CONTRIBUTING.md d0123ad97d fix typo (#91) 2 years ago
Dockerfile 315e90b4b1 feat(docker): use the stable version of PHP 8.2 (#123) 2 years ago
Dockerfile.alpine 315e90b4b1 feat(docker): use the stable version of PHP 8.2 (#123) 2 years ago
Dockerfile.dev 4c27ebc398 fix: dev Docker image and various typos (#67) 2 years ago
LICENSE f8bdd640cf docs: add license (#24) 2 years ago
README.md 0f00b9ef41 docs: add Sulu tutorial (#108) 2 years ago
cgi.go 18940108d1 feat: add support for $_SERVER['PHP_SELF'] (#71) 2 years ago
docker-bake.hcl 4293397541 feat: add Alpine based Docker image (#43) 2 years ago
frankenphp.c 8e824a7906 perf: remove an extra call to cgo (#117) 2 years ago
frankenphp.go 4332bbe97c fix: don't flush if the request body hasn't been read entirely (#122) 2 years ago
frankenphp.h 8e824a7906 perf: remove an extra call to cgo (#117) 2 years ago
frankenphp.png 625ab8906f docs: update logo 2 years ago
frankenphp.stub.php 9ef3bd7c47 feat: add fastcgi_finish_request() support (#69) 2 years ago
frankenphp_arginfo.h 9ef3bd7c47 feat: add fastcgi_finish_request() support (#69) 2 years ago
frankenphp_test.go 878a30d92f fix: ensure there is always a free thread for non-worker scripts (#105) 2 years ago
go.mod b719e1cbea docs: improve docs of the Go module (#25) 2 years ago
go.sum b719e1cbea docs: improve docs of the Go module (#25) 2 years ago
options.go b719e1cbea docs: improve docs of the Go module (#25) 2 years ago
recorder_test.go 5012ac30cd chore: improve tests and add missing file (#13) 2 years ago
worker.go 8e824a7906 perf: remove an extra call to cgo (#117) 2 years ago
worker_test.go 878a30d92f fix: ensure there is always a free thread for non-worker scripts (#105) 2 years ago

README.md

FrankenPHP: Modern App Server for PHP

FrankenPHP

FrankenPHP is a modern application server for PHP built on top of the Caddy web server.

FrankenPHP gives superpowers to your PHP apps thanks to its stunning features: Early Hints, worker mode, real-time capabilities, automatic HTTPS, HTTP/2 and HTTP/3 support...

FrankenPHP works with any PHP app and makes your Symfony projects faster than ever thanks to provided integration with the worker mode (Laravel Octane support coming).

FrankenPHP can also be used as a standalone Go library to embed PHP in any app using net/http.

Learn more on frankenphp.dev in this slide deck:

Slides

Getting Started

☢️ FrankenPHP is very experimental, don't use it in production yet, file bugs and write patches! ☢️

docker run -v $PWD:/app/public \
    -p 80:80 -p 443:443 \
    dunglas/frankenphp

Go to https://localhost, and enjoy!

Note: do not attempt to use https://127.0.0.1. Use localhost and accept the self-signed certificate. Caddy has an automatic TLS handling that auto-trusts some local-based hostnames like localhost, but it does not apply to IP addresses. More details on Caddy's "automatic https" docs.

Docs

Examples and Skeletons