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

Robert Landers 11da3be7e5 try cgo flags anyway 11 months ago
.github 11da3be7e5 try cgo flags anyway 11 months ago
C-Thread-Pool ec35afdc7f chore: remove C-Thread-Pool/example.c (#259) 1 year ago
caddy 1564c762ee chore(caddy): bump github.com/dunglas/mercure/caddy in /caddy 11 months ago
docs e3e2ab3612 ci: add missing Go package on Mac (#381) 11 months ago
internal aa1d968dcf refactor: faster $_SERVER variables creation 1 year ago
testdata a98ca7f9de add back fibers test 11 months ago
.dockerignore 537f899939 feat: use tar to embed apps (#333) 11 months ago
.gitignore 2e72b50d10 ci: add Apple Silicon build script (#313) 1 year 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 5c9d7d3f6d docs: link to the website 11 months ago
Dockerfile 537f899939 feat: use tar to embed apps (#333) 11 months ago
LICENSE f8bdd640cf docs: add license (#24) 2 years ago
README.md b845670f07 Fix the broken link in README.md 11 months ago
alpine.Dockerfile 537f899939 feat: use tar to embed apps (#333) 11 months ago
app.tar 537f899939 feat: use tar to embed apps (#333) 11 months ago
build-static.sh e3e2ab3612 ci: add missing Go package on Mac (#381) 11 months ago
cgi.go aa1d968dcf refactor: faster $_SERVER variables creation 1 year ago
dev-alpine.Dockerfile c9bf9940d1 ci: add Super-Linter (#323) 11 months ago
dev.Dockerfile c9bf9940d1 ci: add Super-Linter (#323) 11 months ago
docker-bake.hcl cb02ce4783 ci: add Docker tags containing the minor and major PHP version (#373) 11 months ago
embed.go 537f899939 feat: use tar to embed apps (#333) 11 months ago
frankenphp.c c9bf9940d1 ci: add Super-Linter (#323) 11 months ago
frankenphp.go 6509cddd2a feat: embed PHP apps into the FrankenPHP binary 11 months ago
frankenphp.h c9bf9940d1 ci: add Super-Linter (#323) 11 months 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 c9bf9940d1 ci: add Super-Linter (#323) 11 months ago
frankenphp_test.go a98ca7f9de add back fibers test 11 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 d427f55298 ci: fix release script 11 months ago
request_options.go aa1d968dcf refactor: faster $_SERVER variables creation 1 year ago
static-builder.Dockerfile 58597bfeab ci: better tags for static-builder Docker image 11 months ago
worker.go b4aa8038ff feat: detect when worker crashes or terminates normally (#315) 1 year 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 projects faster than ever thanks to the 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 and in this slide deck:

Slides

Getting Started

Docker

docker run -v $PWD:/app/public \
    -p 80:80 -p 443:443 \
    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. 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.

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