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

Kévin Dunglas a4d21dfc77 lint 4 months ago
.github e0ccd816e6 ci: bump docker/bake-action from 4 to 5 5 months ago
C-Thread-Pool 3709c2a50b chore: switch to upstream C-Thread-Pool 11 months ago
caddy 153e7d6686 chore: simplify log config (#887) 5 months ago
docs a4d21dfc77 lint 4 months ago
internal aa1d968dcf refactor: faster $_SERVER variables creation 1 year ago
testdata e45a788824 fix(caddy): incorrectly prepared environment variables when not using Caddyfile 5 months ago
.dockerignore 6f108a4203 fix: do not extract embedded app on every execution (#488) 10 months ago
.gitignore 2e72b50d10 ci: add Apple Silicon build script (#313) 1 year ago
.hadolint.yaml c9bf9940d1 ci: add Super-Linter (#323) 1 year ago
.markdown-lint.yaml c9bf9940d1 ci: add Super-Linter (#323) 1 year ago
CONTRIBUTING.md 5cb5d0b8f1 docs: fix typo 7 months ago
Dockerfile 175b9a0296 feat: add Brotli compression support (#524) 10 months ago
LICENSE f8bdd640cf docs: add license (#24) 2 years ago
README.md 108ef7f792 docs: X-Sendfile/X-Accel-Redirect 4 months ago
alpine.Dockerfile a6fc22505c feat: compress binary in Alpine with UPX 9 months ago
app.tar 537f899939 feat: use tar to embed apps (#333) 1 year ago
app_checksum.txt 6f108a4203 fix: do not extract embedded app on every execution (#488) 10 months ago
build-static.sh b47f4d3aa0 fix(static): unbundle parallel extension 5 months ago
cgi.go 07a74e5c5a perf: reduce allocs when creating $_SERVER (#540) 8 months ago
dev-alpine.Dockerfile feaa950d89 feat: compile with Go 1.22 (#568) 9 months ago
dev.Dockerfile 3714fdf3a1 fix: superglobals-realated crash with custom extensions in worker mode (#796) 5 months ago
docker-bake.hcl 835ad8acb2 ci: cleanup static build workflows 6 months ago
embed.go 25a858954c fix: temporary directory name for embed apps 7 months ago
frankenphp.c 8ff6cfdda8 refactor: prevent a useless allocation (#895) 5 months ago
frankenphp.go 3714fdf3a1 fix: superglobals-realated crash with custom extensions in worker mode (#796) 5 months ago
frankenphp.h 07a74e5c5a perf: reduce allocs when creating $_SERVER (#540) 8 months ago
frankenphp.png 625ab8906f docs: update logo 2 years ago
frankenphp.stub.php ea5e19ff4b fix: getallheaders() must return request headers (#772) 6 months ago
frankenphp_arginfo.h ea5e19ff4b fix: getallheaders() must return request headers (#772) 6 months ago
frankenphp_test.go 4537f27f67 fix: prevent crash when worker terminates after a file upload 5 months ago
go.mod d99ce659f6 chore: bump golang.org/x/net from 0.25.0 to 0.26.0 5 months ago
go.sum d99ce659f6 chore: bump golang.org/x/net from 0.25.0 to 0.26.0 5 months ago
options.go 07a74e5c5a perf: reduce allocs when creating $_SERVER (#540) 8 months ago
recorder_test.go 5012ac30cd chore: improve tests and add missing file (#13) 2 years ago
release.sh 5da805d9ee ci: use Apple Silicon machines when useful (#550) 9 months ago
reload_test.sh 517e086786 fix: random crashes when reloading (#394) 11 months ago
request_options.go 15a600cdaa chore: fix function name in comment 7 months ago
smartpointer.go 5bda50cbd7 Fix memory leak (#442) 11 months ago
static-builder.Dockerfile 3dbb3fd48d feat(static): add ftp, gettext, gmp, imagick, mbregex, parallel, protobuf, shmop, soap, ssh2, sysmsg, sysvshm, tidy, xlswriter, yaml and zstd extensions (#773) 6 months ago
worker.go 90a7b98b10 feat: log the number of threads and workers during startup 6 months ago
worker_test.go e45a788824 fix(caddy): incorrectly prepared environment variables when not using Caddyfile 5 months 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 Laravel and Symfony projects faster than ever thanks to their official integrations with the worker mode.

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

Learn more on frankenphp.dev and in this slide deck:

Slides

Getting Started

Docker

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

Go to https://localhost, and enjoy!

[!TIP]

Do not attempt to use https://127.0.0.1. Use https://localhost and accept the self-signed certificate. Use the SERVER_NAME environment variable to change the domain to use.

Standalone Binary

If you prefer not to use Docker, we provide standalone FrankenPHP binaries for Linux and macOS containing PHP 8.3 and most popular PHP extensions: Download FrankenPHP

To serve the content of the current directory, run:

./frankenphp php-server

You can also run command-line scripts with:

./frankenphp php-cli /path/to/your/script.php

Docs

Examples and Skeletons