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

Kévin Dunglas 71661c45e2 fix: crash when a write error occurs (#651) 1 год назад
.github 408cc5fb5a ci: re-add non-debug builds to the matrix (#656) 1 год назад
C-Thread-Pool 3709c2a50b chore: switch to upstream C-Thread-Pool 1 год назад
caddy 822f80829e chore: bump deps 1 год назад
docs 68b1d6f632 Update compile.md 1 год назад
internal aa1d968dcf refactor: faster $_SERVER variables creation 1 год назад
testdata b71dae9b03 fix: prevent crash when calling apache_request_headers() in non-HTTP context 1 год назад
.dockerignore 6f108a4203 fix: do not extract embedded app on every execution (#488) 1 год назад
.gitignore 2e72b50d10 ci: add Apple Silicon build script (#313) 1 год назад
.hadolint.yaml c9bf9940d1 ci: add Super-Linter (#323) 1 год назад
.markdown-lint.yaml c9bf9940d1 ci: add Super-Linter (#323) 1 год назад
CONTRIBUTING.md e0531fa17c ci: build static binary with debug symbols 1 год назад
Dockerfile 175b9a0296 feat: add Brotli compression support (#524) 1 год назад
LICENSE f8bdd640cf docs: add license (#24) 2 лет назад
README.md 963b3e0f59 docs: add FR translations and various EN improvements (#589) 1 год назад
alpine.Dockerfile a6fc22505c feat: compress binary in Alpine with UPX 1 год назад
app.tar 537f899939 feat: use tar to embed apps (#333) 1 год назад
app_checksum.txt 6f108a4203 fix: do not extract embedded app on every execution (#488) 1 год назад
build-static.sh 83aaa0977f ci: prevent failures when using custom libs for static binaries (#642) 1 год назад
cgi.go 07a74e5c5a perf: reduce allocs when creating $_SERVER (#540) 1 год назад
dev-alpine.Dockerfile feaa950d89 feat: compile with Go 1.22 (#568) 1 год назад
dev.Dockerfile feaa950d89 feat: compile with Go 1.22 (#568) 1 год назад
docker-bake.hcl feaa950d89 feat: compile with Go 1.22 (#568) 1 год назад
embed.go 6f108a4203 fix: do not extract embedded app on every execution (#488) 1 год назад
frankenphp.c 71661c45e2 fix: crash when a write error occurs (#651) 1 год назад
frankenphp.go 1511decad6 chore: some CS changes 1 год назад
frankenphp.h 07a74e5c5a perf: reduce allocs when creating $_SERVER (#540) 1 год назад
frankenphp.png 625ab8906f docs: update logo 2 лет назад
frankenphp.stub.php 5a8e5f9518 feat: add apache_response_headers() function (#530) 1 год назад
frankenphp_arginfo.h 5a8e5f9518 feat: add apache_response_headers() function (#530) 1 год назад
frankenphp_test.go 07a74e5c5a perf: reduce allocs when creating $_SERVER (#540) 1 год назад
go.mod 822f80829e chore: bump deps 1 год назад
go.sum 822f80829e chore: bump deps 1 год назад
options.go 07a74e5c5a perf: reduce allocs when creating $_SERVER (#540) 1 год назад
recorder_test.go 5012ac30cd chore: improve tests and add missing file (#13) 2 лет назад
release.sh 5da805d9ee ci: use Apple Silicon machines when useful (#550) 1 год назад
reload_test.sh 517e086786 fix: random crashes when reloading (#394) 1 год назад
request_options.go 07a74e5c5a perf: reduce allocs when creating $_SERVER (#540) 1 год назад
smartpointer.go 5bda50cbd7 Fix memory leak (#442) 1 год назад
static-builder.Dockerfile e0531fa17c ci: build static binary with debug symbols 1 год назад
worker.go 07a74e5c5a perf: reduce allocs when creating $_SERVER (#540) 1 год назад
worker_test.go 07a74e5c5a perf: reduce allocs when creating $_SERVER (#540) 1 год назад

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 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