mirror of
https://github.com/php/frankenphp.git
synced 2026-03-24 00:52:11 +01:00
4a87ad3609a887f56390722a6f9df90d46aa737e
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
Languages
Go
77.2%
PHP
8.5%
C
6.3%
Shell
2.9%
Dockerfile
2.3%
Other
2.8%