Go to file
2022-05-20 09:42:30 +02:00
caddy feat: add a woker mode (#1) 2022-05-18 11:52:24 +02:00
testdata feat: add a woker mode (#1) 2022-05-18 11:52:24 +02:00
.gitignore feat: Caddy module 2021-11-01 00:18:30 +01:00
cgi.go feat: add a woker mode (#1) 2022-05-18 11:52:24 +02:00
CONTRIBUTING.md initial commit 2021-09-24 18:52:20 +02:00
Dockerfile feat: add a woker mode (#1) 2022-05-18 11:52:24 +02:00
frankenphp_test.go docs: add examples 2022-05-20 09:42:30 +02:00
frankenphp.c chore: fix some typos and conventions 2022-05-19 14:46:35 +02:00
frankenphp.go chore: fix some typos and conventions 2022-05-19 14:46:35 +02:00
frankenphp.h feat: add a woker mode (#1) 2022-05-18 11:52:24 +02:00
go.mod feat: add a woker mode (#1) 2022-05-18 11:52:24 +02:00
go.sum feat: add a woker mode (#1) 2022-05-18 11:52:24 +02:00
README.md chore: fix some typos and conventions 2022-05-19 14:46:35 +02:00
worker_test.go docs: add examples 2022-05-20 09:42:30 +02:00
worker.go fix: memory leaks and refactor worker code (#2) 2022-05-18 21:19:07 +02:00

Caddy PHP

Install

Docker

The easiest way to get started is to use our Docker image:

docker build -t frankenphp .

Compile From Sources

Install PHP

Most distributions don't provide packages containing ZTS builds of PHP. Because the Go HTTP server uses goroutines, a ZTS build is needed.

Start by downloading the latest version of PHP, then follow the instructions according to your operating system.

Linux
./configure \
    --enable-embed=static \
    --enable-zts
make -j6
make install
Mac

The instructions to build on Mac and Linux are similar. However, on Mac, you have to use the Homebrew package manager to install libiconv and bison. You also need to slightly tweak the configuration.

brew install libiconv bison
echo 'export PATH="/opt/homebrew/opt/bison/bin:$PATH"' >> ~/.zshrc
./configure \
    --enable-embed=static \
    --enable-zts \
    --with-iconv=/opt/homebrew/opt/libiconv/ \
    --without-pcre-jit
make -j6
make install

Compile the Go App

go get -d -v ./...
go build -v

Misc Dev Resources