mirror of
https://github.com/dunglas/frankenphp.git
synced 2025-12-24 13:38:11 +08:00
* refactor: better memory management * wip * tmp * introduce a go-like api * upgraded to PHP 8.2 * Fix thread safety issues * fix tests * wip * refactor worker * worker prototype * fix populate env * session * improve tests * fix Caddy tests * refactor
1.9 KiB
1.9 KiB
Caddy PHP
Install
Docker
The easiest way to get started is to use our Docker image:
docker build -t frankenphp .
Compile fron 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