2022-10-05 15:44:02 +02:00
2022-10-04 17:42:45 +02:00
2022-05-18 11:52:24 +02:00
2022-10-04 17:42:45 +02:00
2022-10-04 17:42:45 +02:00
2022-10-04 17:42:45 +02:00
2022-10-04 17:42:45 +02:00
2022-10-04 17:42:45 +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

To use FrankenPHP, you currently need to compile a fork of PHP. Patches have been contributed upstream, and some have already been merged. It will be possible to use the vanilla version of PHP starting with version 8.3.

First, get our PHP fork and prepare it:

git clone https://github.com/dunglas/php-src.git
cd php-src
git checkout frankenphp-8.2
./buildconf

Then, configure PHP for your platform:

Linux:

./configure \
    --enable-embed \
    --enable-zts \
    --disable-zend-signals

Mac:

Use the Homebrew package manager to install libiconv and bison:

brew install libiconv bison
echo 'export PATH="/opt/homebrew/opt/bison/bin:$PATH"' >> ~/.zshrc

Then run the configure script:

./configure \
    --enable-embed=static \
    --enable-zts \
    --disable-zend-signals \
    --disable-opcache-jit \
    --with-iconv=/opt/homebrew/opt/libiconv/ \
    --enable-static \
    --enable-shared=no

These flags are required, but you can add other flags (extra extensions...) if needed.

Finally, compile PHP:

make -j6
make install

Compile the Go App

You can now use the Go lib and compile our Caddy build:

cd caddy/frankenphp
go build

Misc Dev Resources

Description
⚠️ ARCHIVED: Original GitHub repository no longer exists. Preserved as backup on 2026-01-22T16:21:30.746Z
Readme MIT 48 MiB
Languages
Go 77.2%
PHP 8.5%
C 6.3%
Shell 2.9%
Dockerfile 2.3%
Other 2.8%