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

Kévin Dunglas 34262949d7 ci: fix push or Docker dev images 9 months ago
.github 34262949d7 ci: fix push or Docker dev images 9 months ago
C-Thread-Pool 3709c2a50b chore: switch to upstream C-Thread-Pool 10 months ago
caddy 175b9a0296 feat: add Brotli compression support (#524) 9 months ago
docs 3d9f344a50 docs: Docker image updates and tags 9 months ago
internal aa1d968dcf refactor: faster $_SERVER variables creation 1 year ago
testdata 5a8e5f9518 feat: add apache_response_headers() function (#530) 9 months ago
.dockerignore 6f108a4203 fix: do not extract embedded app on every execution (#488) 9 months ago
.gitignore 2e72b50d10 ci: add Apple Silicon build script (#313) 11 months ago
.hadolint.yaml c9bf9940d1 ci: add Super-Linter (#323) 11 months ago
.markdown-lint.yaml c9bf9940d1 ci: add Super-Linter (#323) 11 months ago
CONTRIBUTING.md b624a13430 docs: improve HTTPS documentation (#480) 9 months ago
Dockerfile 175b9a0296 feat: add Brotli compression support (#524) 9 months ago
LICENSE f8bdd640cf docs: add license (#24) 2 years ago
README.md b624a13430 docs: improve HTTPS documentation (#480) 9 months ago
alpine.Dockerfile 175b9a0296 feat: add Brotli compression support (#524) 9 months ago
app.tar 537f899939 feat: use tar to embed apps (#333) 11 months ago
app_checksum.txt 6f108a4203 fix: do not extract embedded app on every execution (#488) 9 months ago
build-static.sh 175b9a0296 feat: add Brotli compression support (#524) 9 months ago
cgi.go aa1d968dcf refactor: faster $_SERVER variables creation 1 year ago
dev-alpine.Dockerfile 175b9a0296 feat: add Brotli compression support (#524) 9 months ago
dev.Dockerfile 175b9a0296 feat: add Brotli compression support (#524) 9 months ago
docker-bake.hcl 67fdefc416 ci: build Linux aarch64 binaries (#432) 10 months ago
embed.go 6f108a4203 fix: do not extract embedded app on every execution (#488) 9 months ago
frankenphp.c fe7e9e7c79 fix: crash when using apache_request_headers() (#536) 9 months ago
frankenphp.go fe7e9e7c79 fix: crash when using apache_request_headers() (#536) 9 months ago
frankenphp.h 49baf02035 feat: add go_apache_request_headers() 9 months ago
frankenphp.png 625ab8906f docs: update logo 2 years ago
frankenphp.stub.php 5a8e5f9518 feat: add apache_response_headers() function (#530) 9 months ago
frankenphp_arginfo.h 5a8e5f9518 feat: add apache_response_headers() function (#530) 9 months ago
frankenphp_test.go 6dee113a01 perf: add $_SERVER creation benchmark 9 months ago
go.mod 9b09be22be chore: bump github.com/stretchr/testify from 1.8.1 to 1.8.4 11 months ago
go.sum 9b09be22be chore: bump github.com/stretchr/testify from 1.8.1 to 1.8.4 11 months ago
options.go fb63099a88 feat: allow passing env vars to workers (#210) 1 year ago
recorder_test.go 5012ac30cd chore: improve tests and add missing file (#13) 2 years ago
release.sh 7c5f18fe3f ci: fix changelog generation 10 months ago
reload_test.sh 517e086786 fix: random crashes when reloading (#394) 10 months ago
request_options.go aa1d968dcf refactor: faster $_SERVER variables creation 1 year ago
smartpointer.go 5bda50cbd7 Fix memory leak (#442) 10 months ago
static-builder.Dockerfile 36a6daa8ba docs: use tabs instead of spaces in Dockerfiles 9 months ago
worker.go 7830aae549 Ensure we don't modify a shared env (#452) 10 months ago
worker_test.go aa1d968dcf refactor: faster $_SERVER variables creation 1 year 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 and Laravel projects faster than ever thanks to the provided integration 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 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